List items need not all have the same type. : List Element « List « Python






List items need not all have the same type.

List items need not all have the same type.


a = ['spam', 'eggs', 100, 1234]
print a


           
       








Related examples in the same category

1.Class inside a ListClass inside a List
2.Int, string, function, and list as list elementInt, string, function, and list as list element
3.lambda function as a list numberlambda function as a list number