Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def group_stats(stats):
- pairs = []
- for stat in stats:
- char = stat[0].split('/')[0]
- if char not in pairs:
- pairs.append(char)
- results = [[pair,] for pair in pairs]
- for result in results:
- for i in range(1, len(stats[0])):
- result.append(0)
- for result in results:
- for stat in stats:
- if result[0] == stat[0].split('/')[0]:
- for i in range(1, len(result)):
- result[i] += stat[i]
- for result in results:
- if result[0] in current_app.config['CURRENCIES']:
- result[0] = current_app.config['CURRENCIES'][result[0]]
- print(results)
- return results
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement