Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def process_anfisa(query):
- if query == 'Анфиса, сколько у меня друзей?':
- count_string = format_count_friends(len(DATABASE))
- return f'У тебя {count_string}'
- elif query == 'Анфиса, кто все мои друзья?':
- friends_string = ', '.join(DATABASE.keys())
- return f'Твои друзья: {friends_string}'
- elif query == 'Анфиса, где все мои друзья?':
- unique_cities = set(DATABASE.values())
- cities_string = ', '.join(unique_cities)
- return f'Твои друзья в городах: {cities_string}'
- else:
- return '<неизвестный запрос>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement