CSC108H1 Lecture Notes - Immutable Object, Boolean Expression
yifanyang and 39659 others unlocked
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,