Open in TheBrain

Google Python Class Day 1 Part 1 Parlante Nick

<p>Jan 26, 2013 06:05 PM

&#160;

Nick Parlante works at google at EngEDU and is also a lecturer at Stanford.

this is a 2 day class... &#160;&#160;got 690,000 views...

&#160;

note: &#160;Nick is probably running this in a Unix shell... that's why

python... hello &#160;works for him &#160;and &#160;./ &#160;works for him... &#160;he does NOT explain that!

&#160;

print sys.argv &#160;will show you the arguments list from the command line.

&#160;

python lists have square brackets around them and comma separated;

&#160;

two ways to research what is in a module

&#160;

import sys

&#160;

dir (sys) &#160;will show you what is in the module

&#160;

help(sys) &#160;will show you help

&#160;

or help (sys.exit) &#160;will youhelp on just that one function &#160;exit.

&#160;

len &#160;is a built in function... just type that in...

&#160;

help (len)

&#160;

or just SEARCH in GOOGLE: &#160;&#160;python &#160;sys exit...

&#160;

&#160;

&#160;

&#160;</p>

Attachments