Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def filter_first_decade(data):
- result = []
- for row in data:
- year = row[1]
- if year >= 2000 and year <= 2010:
- result.append(row)
- return result
- def print_table(data):
- print('Название | Год | Рейтинг | Длина | Бюджет | Сборы |')
- print('--------------------------------------------------------------------------------')
- for row in data:
- print('{: <35} | {} | {: >7.2f} | {: >5} | {: >6.1f} | {: >6.1f} |'.format(
- row[0], row[1], row[2], row[3], row[5], row[6]))
- filtered_data = filter_first_decade(oscar_data)
- print_table(filtered_data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement