a guest Oct 22nd, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  2. def process_friend(name, query):
  3.     if name in DATABASE:
  4.         city = DATABASE[name]
  5.         if query == 'ты где?':
  6.             return f'{name} в городе {city}'
  7.         elif query == 'который час?':
  8.             if city not in UTC_OFFSET:
  9.                 return f'<не могу определить время в городе {city}>'
  10.             time = what_time(city)
  11.             return f'Там сейчас {time}'
  12.         else:
  13.             return '<неизвестный запрос>'
  14.     else:
  15.         return f'У тебя нет друга по имени {name}'
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