a guest Jan 21st, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. line = input()
  2. line = line.split(", ")
  3. if line[-1] == "wolf":
  4.   print("Please go away and stop eating my sheep")
  5. else:
  6.   for i in line:
  7.     if i == "wolf":
  8.       sheep_number = len(line) - (line.index("wolf")) - 1
  9.   print(f"Oi! Sheep number {sheep_number}! You are about to be eaten by a wolf!")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand