Reviewing Python studies after a break on doing other things such as moves, work projects and life. Here’s some of my notes from the past reviews and notebooks.
Data Objects
object.attribute function(argument) object.method(argument)
list = ['a', 'b', 'c'] dictionary = {'key':'value','key':'value'} tuple = ('bob',40)
for target in object: statement else: statement
Files
f = open ('foo.txt', 'rU') for line in f: print(line), f.close()
Classes
def myclass(mylocallist): print(mylocallist) myclass(mylist)