Kent Johnson wrote:
On Mon, Jul 27, 2009 at 4:02 PM, Alan Gauld wrote:
You might want to investigate the maketrans and translate functions in the
string module.
The seem to be quite similar in intent to what you are trying to do?
No, those will only do 1-for-1 character substitutions
On Mon, Jul 27, 2009 at 4:02 PM, Alan Gauld wrote:
> You might want to investigate the maketrans and translate functions in the
> string module.
>
> The seem to be quite similar in intent to what you are trying to do?
No, those will only do 1-for-1 character substitutions.
Kent
_
"Chris Castillo" wrote
and I am trying to turn it into english with the following code:
def eng2leet(astring):
astring = astring.replace("4","a")
astring = astring.replace("8","b")
astring = astring.replace("[","c")
astring = astring.replace("|)","d")
You might want to investig
On Mon, Jul 27, 2009 at 2:08 PM, Dave Angel wrote:
> Chris Castillo wrote:
>
>> so I have a string:
>>
>> 1 4|-| 50 |_33+. I love [#ick3n 4nd ch3353. Don't you love +|_|2|\e7
>> \/\/1+# the |#a|-|i|_7?
>>
>>
>> and I am trying to turn it into english with the following code:
>>
>> fileIn = open
Chris Castillo wrote:
so I have a string:
1 4|-| 50 |_33+. I love [#ick3n 4nd ch3353. Don't you love +|_|2|\e7
\/\/1+# the |#a|-|i|_7?
and I am trying to turn it into english with the following code:
fileIn = open("encrypted.txt", "r").read()
def eng2leet(astring):
astring = astring.re
On Mon, Jul 27, 2009 at 1:38 PM, J Sisson wrote:
> You need a deterministic algorithm for conversion. It's impossible
> (without analyzing the context of the word) to translate "|_|#" (it's either
> "lf" or "uh", but which?).
>
>
>
>
> On Mon, Jul 27, 2009 at 1:13 PM, Chris Castillo wrote:
>
>>
You need a deterministic algorithm for conversion. It's impossible (without
analyzing the context of the word) to translate "|_|#" (it's either "lf" or
"uh", but which?).
On Mon, Jul 27, 2009 at 1:13 PM, Chris Castillo wrote:
> so I have a string:
>
> 1 4|-| 50 |_33+. I love [#ick3n 4nd ch3
so I have a string:
1 4|-| 50 |_33+. I love [#ick3n 4nd ch3353. Don't you love +|_|2|\e7
\/\/1+# the |#a|-|i|_7?
and I am trying to turn it into english with the following code:
fileIn = open("encrypted.txt", "r").read()
def eng2leet(astring):
astring = astring.replace("4","a")
astri