-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleet.py
More file actions
32 lines (24 loc) · 724 Bytes
/
leet.py
File metadata and controls
32 lines (24 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
"""
This is the doc string for the module/script.
"""
import sys
# other imports (standard library, standard non-library, local)
#import str
# constants (AKA global variables -- keep these to a minimum)
a = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY2"
l = "46cd3f6h19k1mn0pqr57uvwxyz4BCD3F6H19K1MN0PQRS7UVWXY2"
n = "1234567890"
t = str.maketrans(a, l)
# main function
def main(args):
"""
This is the docstring for the main() function
:param args: Command line arguments.
:return: None
"""
prompt = "> "
s = input(prompt)
print((s.translate(t)))
if __name__ == '__main__':
main(sys.argv[1:]) # Pass command line args (minus script name) to main()