File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def get_args():
1717 formatter_class = argparse .ArgumentDefaultsHelpFormatter ,
1818 )
1919
20- parser .add_argument ("positional " , metavar = "str" , help = "Input text" )
20+ parser .add_argument ("text " , metavar = "str" , help = "Input text" )
2121
2222 return parser .parse_args ()
2323
@@ -27,7 +27,6 @@ def main():
2727 """Make a jazz noise here"""
2828
2929 args = get_args ()
30- pos_arg = args .positional
3130
3231 jumper = {
3332 "1" : "9" ,
@@ -42,11 +41,7 @@ def main():
4241 "0" : "5" ,
4342 }
4443
45- for char in pos_arg :
46- if char in jumper :
47- print (jumper [char ], end = "" )
48- else :
49- print (char , end = "" )
44+ print ("" .join ([jumper .get (char , char ) for char in args .text ]))
5045
5146
5247# --------------------------------------------------
You can’t perform that action at this time.
0 commit comments