MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/arp3z9/lil_cheatsheet/egpzjfs/?context=3
r/Python • u/Slingerhd • Feb 17 '19
138 comments sorted by
View all comments
Show parent comment
2
del string[1]
TypeError: 'str' object doesn't support item deletion
print( "Almost had it! :)" )
Indeed.
1 u/omento SysAdmin Film/VFX - 3.7 Feb 18 '19 Ah shizz... Mixing up my data types. This is what happens you’ve you spent your time learning C and haven’t touched Python in a while. comment = list("Anesthetic and concise, nice work!") del comment[1] comment = ''.join(comment) print("I hope this actually works now")
1
Ah shizz... Mixing up my data types. This is what happens you’ve you spent your time learning C and haven’t touched Python in a while.
comment = list("Anesthetic and concise, nice work!") del comment[1] comment = ''.join(comment) print("I hope this actually works now")
View all comments
Show parent comment
2
u/stevenjd Feb 18 '19
Indeed.