Advertisement
Spocoman

03. Wolf In Sheep's Clothing

Jan 15th, 2022 (edited)
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. Решение с лист и тернарен оператор:
  2.  
  3. queue = list(input().split(', '))
  4.  
  5. print('Please go away and stop eating my sheep' if queue[-1] == 'wolf' else
  6.       f'Oi! Sheep number {len(queue) - 1 - queue.index("wolf")}! You are about to be eaten by a wolf!')
  7.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement