Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions strings/solve-yaser25.py
Original file line number Diff line number Diff line change
@@ -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()