Ledger Nano X - The secure hardware wallet
SHARE
TWEET

"morese" example for stackoverflow

furas May 7th, 2020 737 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. u = '1000111001'
  2. u = '11011'
  3.  
  4. result = ""
  5.  
  6. while u:
  7.     if u.startswith("000"):
  8.         result += '333'
  9.         u = u[3:]
  10.     elif u.startswith("00"):
  11.         result += '22'
  12.         u = u[2:]
  13.     elif u.startswith("0"):
  14.         result += '1'
  15.         u = u[1:]
  16.     elif u.startswith("11"):
  17.         result += '-'
  18.         u = u[2:]
  19.     elif u.startswith("1"):
  20.         result += '.'
  21.         u = u[1:]
  22.  
  23. print(result)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top