Python lists
Python uses lists instead of arrays. Lists are dynamic and have specific methods which can make dealing with collections much simpler. With arrays once you have created one you are unable to add more items. They are fixed length and as such are known as fixed length. Lists on the other hand are dynamic which means they can have extra items added. The code below demonstrates this –
names = ["bert", "sally"]
print names
names.append("fred")
names.append("sue")
print names
Use the append method to add “joe” to the names list.
[TODO] Bug in the check code (need to escape the answer properly!) Will fix asap.
Output: (clear)











