Why isn't 'e' changing to 'pP here when the vowel list is mutable:
vowelList = list('aeiouy')
for x in vowelList:
if x == 'e':
x = 'P'
print(vowelList)
#result: ['a', 'e', 'i', 'o', 'u', 'y']
--
Jim Mooney
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
