Lists are very easy to create, these are some of the ways to make lists:
emptyList = [ ]
strlist = ['one, two, three, four, five']
I find the "strlist" example very misleading, as a beginner might think we are creating a list of five strings, when it is actually just one string with some commas in it.
Lists are very easy to create, these are some of the ways to make lists:
emptyList = [ ]
strlist = ['one, two, three, four, five']
I find the "strlist" example very misleading, as a beginner might think we are creating a list of five strings, when it is actually just one string with some commas in it.