Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- word = input()
- string = ''
- rage_quit_message = ''
- for i in range(len(word)):
- if word[i].isdigit():
- count_str = word[i]
- if i + 1 < len(word) and word[i + 1].isdigit():
- count_str += word[i + 1]
- count = int(count_str)
- rage_quit_message += string.upper() * count
- string = ''
- else:
- string += word[i]
- symbols_count = (len(set(rage_quit_message)))
- print(f"Unique symbols used: {symbols_count}")
- print(rage_quit_message)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement