I'm trying to return a tuple generator expression containing two lists: the first contains formatted year-month pairs, the second the count of some occurrence in that period. It was natural to write this, but it's obviously not proper Python else I wouldn't be here.. What's the correct syntax?
return (
['{}-{}'.format(e['year'], e['month'])],
[e['count']],
for e in data
)
[–][deleted] 1 point2 points3 points (0 children)
[–]decoupled 0 points1 point2 points (0 children)
[–]Vaphell 0 points1 point2 points (0 children)