Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string = input().split(", ")
- if string[-1] == "wolf":
- print("Please go away and stop eating my sheep")
- else:
- sheep_counter = 0
- for i in range(len(string)-1, -1, -1):
- if string[i] == "sheep":
- sheep_counter += 1
- else:
- break
- print(f"Oi! Sheep number {sheep_counter}! You are about to be eaten by a wolf!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement