diff --git a/strings/solve-yaser25.py b/strings/solve-yaser25.py new file mode 100644 index 0000000..6d5ef0b --- /dev/null +++ b/strings/solve-yaser25.py @@ -0,0 +1,17 @@ +yaser = "Whiskey Hotel Four Tango Dash Alpha Romeo Three Dash Yankee Oscar Uniform Dash Sierra One November Kilo India November Golf Dash Four Bravo Zero Uniform Seven" +'''to separate -yaser-, and Access to the list''' +yas = yaser.split(" ") +#------------------------------------- +num_dic = { + "One": 1, "Two": 2, "Three": 3, "Four": 4, + "Five": 5, "Six": 6, "Seven": 7, "Eight": 8, + "Nine": 9, "Zero": 0, "Dash": '-' +} +#------------------------------------- +'''Use the function to read more''' +def main(): + for i in yas: + print(num_dic.get(i , i[0]), end="") +#------------------------------------- +if __name__ == '__main__': + main()