Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Python for the moment.....
- # We will make it simple('py2')
- # 007.py
- # python 007.py
- # We take words, Then convert to int
- # When communicating over IRC or online platforms only your
- #reader is able to decipher from -input to -output.
- # Here, We will convert letters into "Double" Digit instead of the traditional method ( A=1) We want A=22 for example))
- # “one” => 1
- “twenty” => 20
- “two hundred forty-six” => 246
- “seven hundred eighty-three thousand nine hundred and nineteen” => 783919.
- # pip install word2number
- input = raw_input('Write Text: ')
- input = input.lower()
- output = []
- for character in input:
- number = ord(character) - 96
- output.append(number)
- print(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement