Anonymous user
Community Data Science Workshops (Fall 2014)/Day 1 lecture: Difference between revisions
Community Data Science Workshops (Fall 2014)/Day 1 lecture (view source)
Revision as of 16:49, 8 November 2014
, 9 years ago→Lists
imported>Mako |
imported>Mako (→Lists) |
||
Line 49:
=== Lists ===
▲#* purpose
▲#* initialization
▲#* <tt>len()</tt> review
* slicing lists
#* changing elements▼
▲#** len()
▲#*** <code>len("")</code> length of the empty string
* infinite loops
#* <tt>break</tt>▼
# dictionaries▼
#* purpose▼
#* initialization▼
▲#* accessing elements
#* adding elements▼
#* <tt>keys()</tt> and <tt>values()</tt>▼
# modules▼
#* purpose▼
#* builtins▼
#* imports▼
#* <tt>import random</tt>▼
#* <tt>random.randint</tt>▼
#* <tt>random.choice</tt>▼
#* walk through state_capitals.py▼
Where state_capitals.py from http://mako.cc/teaching/2014/cdsw/state_capitals.py is the grand finale and synthesis of lecture material.
|