SHARE
TWEET

Untitled

a guest Dec 8th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def get_list_friend(user_id):
  2.     all_friend = get_all_friend(user_id)[0]
  3.     list_friend = all_friend.split(' ')[1:]
  4.     return list_friend
  5.  
  6. def get_name_by_id(user_id):
  7.     cur = connection.cursor()
  8.     cur.execute(f"SELECT username FROM quiz.users_id where user_id = {user_id}")
  9.     connection.commit()
  10.     return (cur.fetchone())
  11.  
  12.  
  13. def get_nickname(user_id):
  14.     nicknames = []
  15.     ids = get_list_friend(user_id)
  16.     for i in ids:
  17.         get_name_by_id(i)
  18.         nicknames.append(i)
  19.     return nicknames            #все равно возвращатся айди
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
 
Top