@@ -13,19 +13,20 @@ def get_args():
1313 """Get command-line arguments"""
1414
1515 parser = argparse .ArgumentParser (
16- description = 'Jump the five algorithm' ,
17- formatter_class = argparse .ArgumentDefaultsHelpFormatter )
16+ description = "Jump the five algorithm" ,
17+ formatter_class = argparse .ArgumentDefaultsHelpFormatter ,
18+ )
1819
19- parser .add_argument ('ctext' ,
20- metavar = 'str' ,
21- help = 'cryptic text' )
20+ parser .add_argument ("ctext" , metavar = "str" , help = "cryptic text" )
2221
23- parser .add_argument ('-a' ,
24- '--arg' ,
25- help = 'A named string argument' ,
26- metavar = 'str' ,
27- type = str ,
28- default = '' )
22+ parser .add_argument (
23+ "-a" ,
24+ "--arg" ,
25+ help = "A named string argument" ,
26+ metavar = "str" ,
27+ type = str ,
28+ default = "" ,
29+ )
2930
3031 return parser .parse_args ()
3132
@@ -37,9 +38,20 @@ def main():
3738 args = get_args ()
3839 str_arg = args .ctext
3940
40- num_jump = {'1' :'9' , '2' :'8' , '3' :'7' , '4' :'6' , '5' :'0' , '6' :'4' , '7' :'3' , '8' :'2' , '9' :'1' , '0' :'5' }
41-
42- decode_text = ''
41+ num_jump = {
42+ "1" : "9" ,
43+ "2" : "8" ,
44+ "3" : "7" ,
45+ "4" : "6" ,
46+ "5" : "0" ,
47+ "6" : "4" ,
48+ "7" : "3" ,
49+ "8" : "2" ,
50+ "9" : "1" ,
51+ "0" : "5" ,
52+ }
53+
54+ decode_text = ""
4355
4456 for char in str_arg :
4557 if char .isnumeric ():
@@ -48,10 +60,9 @@ def main():
4860 else :
4961 decode_text += char
5062
51-
52- print (f'{ decode_text } ' )
63+ print (f"{ decode_text } " )
5364
5465
5566# --------------------------------------------------
56- if __name__ == ' __main__' :
67+ if __name__ == " __main__" :
5768 main ()
0 commit comments