Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def decode(c):
- a = 'qazwsxedcrfvtgbyhnujmikolpQAZWSXEDCRFVTGBYHNUJMIKOLP'
- n = '0123456789'
- st = ''
- for i in range(len(c)):
- if c[i] in n:
- st += int(c[i]) * c[i+1]
- elif c[i] in a:
- st += c[i]
- elif c[i] and c[i+1] in n:
- st += c[i][i+1] * c[i+2]
- else:
- st += ''
- print(st)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement