Sie sind auf Seite 1von 3

1

1.SomeSuggestedPythonstudypointsfortheexam:
Likeexamquestionsinaseparatefile,comingsoon

Printedmaterialallowedatexam,butnocomputers,smartphones,etc,...

DataTypes
strings,numbers,booleans,None
variables(arenamesofobjects),names,expressions,statements,syntax
assignmentscreateReferences,notcopies
arithmeticoperators,stringoperations,comparisonoperators

Builtinfunctions
abs(),pow(),max(),min(),sum()
type(),isinstance(),hash(),id()
str(),int(),float(),bool(),eval()
booleanoperators:and,or,(returningtheiroperands),not
membershiptesting:in,notin
checkid()equality:is,isnot
checkvalueequality:==,!=

raw_input(),print

Modules,importingfrommodules
modules:copy,collections,math,itertools

Containersandtheirmethods
Sequences:string,list,tuple,range,xrange
indexing,slicing,unpacking,zip
zip/unzipexample
>>>a=zip([1,2],[11,22])
>>>a
[(1,11),(2,22)]
>>>zip(*a)#backintime
[(1,2),(11,22)]

Unorderedcontainers:set,frozenset,dictionary
iterables
(BewareofCyclicDataStructures)
L=[1,2]
L.append(L)

L
[1,2,[...]]
L[2]
[1,2,[...]]
...

Mutable,Hashable,Callable,Iterable
fromcollections:Iterable,Sequence,Callable,Hashable

copy,shallowcopy,deepcopy(seemodulecopy)
files

Controlstructures:iteration,forloop,whileloop,if/elif/else
Theif/elseTernaryExpression
booleancontext
break,continue,pass,andtheLoopelse

Nestedcontrolstructures

Comprehensions:list,set,dictionary
Iterators,iter(),next(),enumerate()
datatypesthatsupportiterators
fromitertools:count(),cycle(),repeat()
collapsingiteratorswithlist(),tuple(),set(),dict()

Generatorexpressions
Nested:comprehensions,iterators,generatorexpressions

Functions,args,mutabilityoftheargs,keywordargs

Generators

Functionalprogramming:map,reduce,filter
firstclassobjects

Anonymousfunctions,Lambda
Nested:Lambda

OOP:classes,methods,constructors,
specialmethods(like__cmp__,__lt__,...)
instances,(objects)

ImplementingRecursion

Das könnte Ihnen auch gefallen