Ask coding questions

← Back to all posts
removing items from strings
h
XanthusPettitt (10)

Hi, I'm trying to remove a character from a string permanently but when I look it up I get nothing. Is there truly no way to remove something with a string forever or am I just not looking hard enough?

Answered by 19ecal (232) [earned 5 cycles]
View Answer
Comments
hotnewtop
19ecal (232)
thing="a long string that you want to remove all the a's from"
thing=thing.replace("a", "")
XanthusPettitt (10)

@19ecal oh yeah that makes alot of sense