Answer the question
In order to leave comments, you need to log in
How to display all the data from for in and then add it to the database?
Faced a problem after a long break in the study. I want to display this (a little lower) in normal text, so that through for in everything is in one line to be added to the database
. An example will be through the BrawlStats api library
import brawlstats
cl = brawlstats.Client(тут токен)
player = cl.get_profile("#9VU9R2LY")#взял случайный рабочий тэг
clubinfo = cl.get_club(str(player.club.tag))
clubmembers = clubinfo.members
print(clubmembers)
[{'tag': '#9VU9R2LY', 'name': '@TERI_BS', 'name_color': '0xffffffff', 'role': 'president', 'trophies': 57726, 'icon': {'id' : 28000044}}, {'tag': '#2PY2R9YQ', 'name': '3BS_youtubeQQQ⛥', 'name_color': '0xffffffff', 'role': 'member', 'trophies': 49081, 'icon': {'id': 28000054}}, {'tag': '#2LJ820QR', 'name': 'NE|HYUN', 'name_color': '0xffff9727', 'role': 'member', 'trophies': 48467 , 'icon': {'id': 28000061}}, {'tag': '#89R29VUU8', 'name': 'ほーぷ', 'name_color': '0xfff9c908', 'role': 'member', 'trophies': 46918, 'icon': {'id': 28000071}}
for names in clubmembers:
print(names["name"])
@TERI_BS
3BS_youtubeQQQ⛥
NE|HYUN
ほーぷ
♚MUB❦(存)♚
Sakura | さくら
♂️魔法のらむくん❦
5月|Tobi
@TERI_BS
3BS_youtubeQQQ⛥
NE|HYUN
ほーぷ
♚MUB❦(存)♚
Sakura | さくら
♂️魔法のらむくん❦
5月|Tobi
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question