Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text = input()
- while True:
- command = input()
- res=''
- if command == 'For Azeroth':
- break
- if 'GladiatorStance' in command:
- text = text.upper()
- res=text
- elif 'DefensiveStance' in command:
- text = text.lower()
- res=text
- elif 'Dispel' in command:
- args = command.split()
- idx = int(args[1])
- if 0 <= idx < len(text):
- letter = args[2]
- text = text[:idx] + letter + text[idx + 1:]
- res='Success!'
- else:
- res='Dispel too weak.'
- elif 'Target' in command:
- args = command.split()
- if args[0] == 'Target':
- type_ = args[1]
- if type_ == 'Change':
- old = args[2]
- new = args[3]
- if old in text:
- text = text.replace(old, new)
- res=text
- elif type_ == 'Remove':
- to_remove = args[2]
- text = text.replace(to_remove, '')
- res=text
- if res:
- print(res)
- else:
- print("Command doesn't exist!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement