[Tutor] query
R. Alan Monroe
amonroe at columbus.rr.com
Mon Feb 1 01:04:10 CET 2010
> i just don wana index all the characters rather i wana double it too like
> ['d','a','v','i','d']
> would b
> ['d','dd','a','aa','v','vv','i','ii','d','dd']
> and then i wana replace all non 'd' characters with '.' a dot
> i know how replace a specific character, but i don know how to
> replace all characters other than a specific character
Hint 1: a FOR loop will help you count your way through lists one
at a time. Let the computer do the counting for you.
Hint 2: learn about IF statements to replace characters IF they're not
a d, for example.
Alan
More information about the Tutor
mailing list