Mega Code Archive
Categories
/
Python
/
List
Int, string, function, and list as list element
foo = [42, 'www.rntsoft.com', lambda x: x**2, [47, '11']] print foo print foo[3] print foo[2](3) foo[3][0] = 99 print foo for i in foo: print i, "--", type(i)