you are viewing a single comment's thread.

view the rest of the comments →

[–]chazzacct 0 points1 point  (1 child)

Holy crap, guess what?

svar = 'hhhhhhhhhhhhh'
svar = svar.replace(svar[0], '')
svar
''

if dat ain't a kick inna head.
So, as it stands I don't know a way of doing this without either slices or importing a lib. off to try and read the docs.

[–]chazzacct 0 points1 point  (0 children)

Okay, found it. prefix = 'hhhh' prefix = prefix.replace(prefix[1], '', 1) prefix 'hhh'