now with bigger and better study habits.
#changing strings
>>> yum = 'sandwich'
>>> nice = yum.replace('andwi', 'cot')
>>> yum
'sandwich'
>>> nice
'scotch'
>>> 'i want %s and %s' %(yum, nice)
'i want sandwich and scotch'
>>> thingtodowheniseeit = yum[:1] + 'nat' + yum[6:] + ' it'
>>> thingtodowheniseeit
'snatch it'
>>> wrong = 'i want spam'
>>> wrong
'i want spam'
>>> right = wrong.replace('spam', yum)
>>> right
'i want sandwich'
>>> redundant = 'i want soda and soda'
>>> good = redundant.replace('soda', nice, 1)
>>> good
'i want scotch and soda'
>>>
>>> order = list(good)
>>> order
['i', ' ', 'w', 'a', 'n', 't', ' ', 's', 'c', 'o', 't', 'c', 'h', ' ', 'a', 'n', 'd', ' ', 's', 'o', 'd', 'a']
>>> order[0] = 'you'
>>> order
['you', ' ', 'w', 'a', 'n', 't', ' ', 's', 'c', 'o', 't', 'c', 'h', ' ', 'a', 'n', 'd', ' ', 's', 'o', 'd', 'a']
>>> foryou = ''.join(order)
>>> foryou
'you want scotch and soda'
>>>
Don't worry, my real notes have more detailed hashing :)