M
manstey
Hi,
I often have code like this:
data='asdfbasdf'
find = (('a','f')('s','g'),('x','y'))
for i in find:
if i[0] in data:
data = data.replace(i[0],i[1])
is there a faster way of implementing this? Also, does the if clause
increase the speed?
Thanks,
Matthew
I often have code like this:
data='asdfbasdf'
find = (('a','f')('s','g'),('x','y'))
for i in find:
if i[0] in data:
data = data.replace(i[0],i[1])
is there a faster way of implementing this? Also, does the if clause
increase the speed?
Thanks,
Matthew