help please
gargonx
gargonx at gmail.com
Sat Feb 12 21:12:32 EST 2005
This works much better, aside from the fact that it does'nt work for
the std dictionary. the letters used from here stay the same. that
dictionary looks like this:
std = {
"A":"Z",
"Z":"A",
"B":"Y",
"Y":"B",
"C":"X",
"X":"C",
"E":"V",
"V":"E",
"H":"S",
"S":"H",
"M":"N",
"N":"M"
}
what could be causing this?
i did figure out that if you reverse the k,v you are able to get it but
that doesn't turn up the results i need
def proc(text):
result = []
for word in text:
for k, v in replacements:
word = word.replace(v,k) #here i reversed them
result.append(word)
return ''.join(result)
More information about the Python-list
mailing list