Add python files
This commit is contained in:
parent
96aa1f721e
commit
27b5664ae7
7 changed files with 271 additions and 0 deletions
20
thinkcspy/Chapter-10-Exercises/Python-files/Problem3.py
Normal file
20
thinkcspy/Chapter-10-Exercises/Python-files/Problem3.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Runestone.Academy thinkcspy course
|
||||
# Chapter 10
|
||||
# Problem 3
|
||||
|
||||
myList = [76, 92.3, 'hello', True, 4, 76]
|
||||
|
||||
# Your code here
|
||||
|
||||
myList += ["apple"]
|
||||
myList.insert(3, "cat")
|
||||
myList.insert(0, 99)
|
||||
print(myList)
|
||||
|
||||
print(myList.index("hello"))
|
||||
print(myList.count(76))
|
||||
|
||||
myList.remove(76)
|
||||
myList.pop(myList.index(True))
|
||||
|
||||
print(myList)
|
||||
Loading…
Reference in a new issue