Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- pattern = r'^\|([A-Z]{4,})\|:#([a-zA-Z]+ [a-zA-Z]+)#$'
- count = int(input())
- for _ in range(count):
- line = input()
- match = re.match(pattern,line)
- if match is None:
- print('Access denied!')
- continue
- boss_name = match[1]
- title = match[2]
- print(f'{boss_name}, The {title}')
- print(f'>> Strength: {len(boss_name)}')
- print(f'>> Armour: {len(title)}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement