Community Data Science Workshops (Fall 2014)/Day 1 lecture: Difference between revisions

imported>Mako
imported>Mako
Line 85:
 
* <tt>for</tt> loops
** e.g., <code>for name in names: print name</code>
** e.g., <code>for name in names: print 'hello ' + name</code>
** Super powerful because it can do something many many times. Data science is about doing tedious things very quickly. For is the workhorse that makes this possible.
** Look and see name is after we're done looping.
** ''Move to editor.'''
* <tt>if</tt> statements inside <tt>for</tt> loops
* nested <tt>for</tt> loops
Anonymous user