Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
switch line to sort by int and not string
Browse files
app.py
CHANGED
@@ -246,8 +246,9 @@ async def update_leaderboard(ctx, num_results: int = 10):
|
|
246 |
|
247 |
# for 3 lists
|
248 |
combined_list = [list(sublist) for sublist in zip(names_list, levels_list, exp_list)]
|
249 |
-
combined_list = sorted(combined_list, key=lambda x: x[1], reverse=True)
|
250 |
combined_list = [[name, int(level), int(exp)] for name, level, exp in combined_list]
|
|
|
|
|
251 |
print(combined_list)
|
252 |
top_results = combined_list[:num_results]
|
253 |
#print(top_results)
|
|
|
246 |
|
247 |
# for 3 lists
|
248 |
combined_list = [list(sublist) for sublist in zip(names_list, levels_list, exp_list)]
|
|
|
249 |
combined_list = [[name, int(level), int(exp)] for name, level, exp in combined_list]
|
250 |
+
combined_list = sorted(combined_list, key=lambda x: x[1], reverse=True)
|
251 |
+
|
252 |
print(combined_list)
|
253 |
top_results = combined_list[:num_results]
|
254 |
#print(top_results)
|