Vincent38190

Untitled

Jan 19th, 2022 (edited)
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. n=input()
  2. print("ze,on,tw,th,fo,fi,si,se,ei,ni".split(",").index((chr(int(n[0:2],16))+chr(int(n[2:4],16))).lower()))
  3.  
  4. ===================================================
  5.  
  6. n,r=str(input()),[]
  7. m={"ONE":1,"TWO":2,"THREE":3,"FOUR":4,"FIVE":5,"SIX":6,"SEVEN":7,"EIGHT":8,"NINE":9,"ZERO":0}
  8. for i in range(0, len(n), 2):
  9.     r.append(int((n[i : i + 2]),16))
  10. print(m.get(''.join(list(map(chr,r))).upper()))
  11.  
  12.  
Add Comment
Please, Sign In to add comment