20 lines
341 B
Python
20 lines
341 B
Python
import json
|
|
import sys
|
|
from collections import Counter
|
|
|
|
if len(sys.argv) != 2:
|
|
print("usage: %s idsofcountry.json" % sys.argv[0])
|
|
sys.exit(1)
|
|
|
|
idsofcountry = sys.argv[1]
|
|
data = json.load(open(idsofcountry))
|
|
|
|
years = Counter()
|
|
|
|
for film in data:
|
|
years[film['year']] += 1
|
|
|
|
|
|
for year in sorted(years):
|
|
print(year, years[year])
|
|
|