Python Shorts 05: Lists

Making a list looks very like making a tuple:

y = ["Jim",25]

The statement above makes a list called y. Note the use of square brackets, which is different from how we make a tuple (which uses round brackets). Lists are a lot more flexible than tuples. For one thing we can change the content of their elements:

y[0]="James"

This statement changes the item at the start of y to “James”. This would work fine.  

If you want to, you can make a list bigger just by appending something