CSC108H1 Lecture Notes - Immutable Object, Boolean Expression

50 views2 pages
11 Jan 2013
School
Course
yifanyang and 39659 others unlocked
CSC108H1 Full Course Notes
21
CSC108H1 Full Course Notes
Verified Note
21 documents

Document Summary

A2, keys and filters case sensitive :dan: and [ dan", [ a. jpg", b. jpg"] different: also differ in type, ie 123 string different from 123 type. >>> marks[1] # parallel arrays or parallel lists. >>> dict_marks[ peter ] # call marks based on key not position. { rob : 75, peter : 62, pauline : 98} #no promised order in dictionary, not necessarily alphabetical and by order of input. { rob : 75, peter : 62, mary : 74, pauline : 98} >>> dict_marks[ diane ] = profs do not get marks . >>> dict_marks # immutable object as keys only, doesn t accept mutable. { rob : 75, peter : 62, diane : profs do not get marks , mary : 72, pauline : 98} >>> dict_marks # immutable & mutable accepted as values. {99: [1, 2, 3, 4], pauline : 98, rob : 75, diane : profs do not get marks , peter : 62,

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