CSC108H5 Lecture Notes - Lecture 18: Standard Streams, Iter, Init

59 views3 pages
School
Course
897wjface and 39475 others unlocked
CSC108H5 Full Course Notes
12
CSC108H5 Full Course Notes
Verified Note
12 documents

Document Summary

# let"s review the two sequences we know so far: strings and lists. # and is just a sequence of characters Typeerror: "str" object does not support item assignment. # and the other is mutable and can store any pthon object. # but they are sequences of python objects, like lists. # tuples come with very few operations, as compared to lists. # methods associated with lists have to do with modifying the lists, # ignore the ones with __ before and after; other than those, the only methods for tuples are index and count. # you can iterate over tuples using loops, just like other sequences. # you can also slice tuples and convert them to lists. # you can also assign individual components of tuples. # if you don"t have enough components, there will be an error. Valueerror: too many values to unpack (expected 2)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents