Answer the question
In order to leave comments, you need to log in
Is additional needed here? Class?
results = cursor.fetchall()
fetched_result = []
for result in results:
fetched_result.append({
'username': result[0],
'spent_money': result[1],
'gems': result[2],
})
return fetched_result
Answer the question
In order to leave comments, you need to log in
If it's easier with a new class, then yes.
At a minimum, it will be easier, because the IDE will be able to tell you what fields are there normally, and it will be possible to type it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question