





























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






























Core data types
Lists: Common Methods
MultiDimensional Lists
my2DList 0 1 2 3
Arbitrary dimensional Lists
e 12 cat beta 14 15 16 my2DList 0 1 2 3
Arbitrary dimensional Lists
cat
e 12 beta 14 15 my2DList 0 1 2 3 p q r s
Lists as sequences of references
Lists are mutable!!
myList = [[1,2,3,’a’],[5,6,7,’cat’],[9,10,’e’,12],[’beta’,14,15,subL]] myList [[1,2,3,’a’],[5,6,7,’cat’],[9,10,’e’,12],[’beta’,14,15,[[‘p’,’q’],[‘r’,’s’]]]]
[[1,2,3,’a’],[5,6,7,’cat’],[9,10,’e’,12],[’beta’,14,15,[[‘p’,’z’],[‘r’,’s’]]]]
Relational Operators
Relational Operators
Boolean Operators
A B A and B A or B Not A xor(A,B) TRUE TRUE TRUE TRUE FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE
General Python Syntax rules
If/elif/else statements if test1:
elif test2:
else:
if/elif/else statements