with connection.cursor() as cursor:
cursor.execute("SELECT * FROM Users ORDER BY likes DESC LIMIT 3")
for row in cursor:
names = (f"{row['name']}")
#likes = (f"{row['likes']}")
top1, top2, top3 = names.split('')
print(f'Первое место {top1}')
print(f'Второе место {top2}')
print(f'Третье место {top3}')
with connection.cursor() as cursor:
cursor.execute("SELECT * FROM Users ORDER BY likes DESC LIMIT 3")
for row in cursor:
name = (f"{row['name']}")
print(name)