Summary


In this chapter, you learned about the concept of sequences. You saw how to create a sequence of numbers with the range() function. You saw how strings are really just sequences of characters. You learned about tuples, which let you organize a sequence of any type. You saw how to go through the elements of a sequence with a for loop. You learned how to get the length of a sequence and how to check if an element is a member of a sequence. You saw how to copy pieces of a sequence through indexing and slicing. You learned about immutability and some of the limitations it places on you. But you also saw how to create new sequences from existing ones through concatenation, in spite of this immutability. Finally, you put everything together to create a challenging word jumble game.




Python Programming for the Absolute Beginner
Python Programming for the Absolute Beginner, 3rd Edition
ISBN: 1435455002
EAN: 2147483647
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net