cs107-lecture-examples

Example codes used during Harvard CS107 lectures
git clone https://git.0xfab.ch/cs107-lecture-examples.git
Log | Files | Refs | README | LICENSE

file1.py (269B)


      1 x = {  'a':37,'b':42,
      2 
      3 'c':927}
      4 
      5 y = 'hello ''world'
      6 z = 'hello '+'world'
      7 a = 'hello {}'.format('world')
      8 class foo  (     object  ):
      9   def f    (self   ):
     10     return       37*-+2
     11   def g(self, x,y=42):
     12       return y
     13 def f  (   a ) :
     14   return      37+-+a[42-x :  y**3]