Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- alph = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"
- text = "Aryslan"
- cnt = 0
- currstring = ""
- currsym = 0
- while True:
- sym = random.choice(alph)
- cnt += 1
- if sym == text[currsym]:
- currstring += sym
- if currsym == len(text) - 1:
- print(cnt, currstring)
- break
- currsym += 1
- continue
- currstring = ""
- currsym = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement