Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import choice
- print("Task 2")
- length = int(input('Length of the string: '))
- cyrillic = ('А','Б','В','Г','Д','Е','Ё','Ж','З','И','Й','К','Л','М','Н','О','П','Р','С','Т','У','Ф','Х','Ц','Ч','Ш','Щ','Ъ','Ы','Ь','Э','Ю','Я')
- rand_str = ''.join(choice(cyrillic) for i in range(length))
- print(rand_str)
- find = input('Search symbol: ')
- print("Symbol >", find, "< index: ", rand_str.find(find), sep='')
Advertisement
Add Comment
Please, Sign In to add comment