CSC108H1 Lecture Notes - Empty String
yifanyang and 39659 others unlocked
21
CSC108H1 Full Course Notes
Verified Note
21 documents
Document Summary
0: ""return the characters in str s that are contained within the outermost pair of matching single or double quotes. If there are no quotes or the outer most quotes don"t match return the empty string. : ex. >>> s = that s a lovely tie! #outer most quotes at s[4] and s[-5] ""this isn"t any fun don"t stop michelle """. >>> s = she said \ hello\ to me . # returns a single double quote. Tuples lists are mutable, tuples are immutable. >>> t = ( one , two , three ) # round brackets indicates tuple, not lists. # cannot change the item at index to refer to a new memory adress. >>> t[1]. append(5) # can can the item itself, if it is mutable.