Zelle - Chapter 11.pdf - CTools
Zelle - Chapter 11.pdf - CTools
Zelle - Chapter 11.pdf - CTools
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
What “is” a List Anyways?<br />
• A list is a special kind of variable<br />
• Regular variables - integer<br />
>>> i = 2<br />
• Contain some data<br />
• Contain some data and capabilities [3, 2, 1]<br />
• Smart variables - string, list<br />
>>> i = i + 1<br />
>>> x = [1, 2, 3]<br />
>>> print x<br />
[1, 2, 3]<br />
>>> x.reverse()<br />
>>> print x<br />
When we combine data + capabilities - we call this an “object”