>>> from temperatures import temperatures_data --input-ini >>> estacions = ['Girona', 'Anglès', 'Olot', 'Farners'] >>> temperatures = [ ... ['09:01:2024', [(0.7, -6.4, 11.7), (3.3, -3.9, 10.2), (0.9, -6.7, 10.8), (2.6, -3.0, 11.3)]], ... ['08:01:2024', [(0.9, -7.2, 13.5), (2.3, -5.2, 13.0), (1.2, -6.1, 11.3), (3.3, -3.3, 13.0)]], ... ['07:01:2024', [(3.2, -4.8, 16.1), (3.9, -3.5, 14.5), (5.0, -1.9, 11.7), (4.8, -11.5, 17.4)]], ... ] --input-fi --output-ini >>> from pprint import pprint >>> tmo = temperatures_data(estacions, temperatures) >>> pprint(tmo) [['09:01:2024', -6.7, 'Olot'], ['08:01:2024', -7.2, 'Girona'], ['07:01:2024', -11.5, 'Farners']] --output-fi >>> estL = ['Girona', 'Anglès', 'Olot', 'Farners', 'A', 'B'] >>> tempL = [ ... ['10:01:2024', [(0.7, -6.4, 11.7), (3.3, -3.9, 10.2), (0.9, -6.7, 10.8), (2.6, -3.0, 11.3), (3.3, -3.9, 10.2), (0.9, -6.7, 10.8)] ], ... ] >>> tmo = temperatures_data(estL, tempL) >>> tmo [['10:01:2024', -6.7, 'Olot']] >>> tempL = [ ... ['10:01:2024', [(4.2, 2.2, 15.5), (4.6, 3.2, 12.5), (2.0, 0.7, 12.8), (4.5, 2.8, 18.3), (4.6, 3.2, 12.5), (2.0, 0.7, 12.8)] ], ... ['09:01:2024', [(0.7, -6.4, 11.7), (3.3, -3.9, 10.2), (0.9, -6.7, 10.8), (2.6, -3.0, 11.3), (3.3, -3.9, 10.2), (0.9, -6.7, 10.8)]], ... ['08:01:2024', [(0.9, -7.2, 13.5), (2.3, -5.2, 13.0), (1.2, -6.1, 11.3), (3.3, -3.3, 13.0), (2.3, -5.2, 13.0), (1.2, -6.1, 11.3)]], ... ['07:01:2024', [(3.2, -4.8, 16.1), (3.9, -3.5, 14.5), (5.0, -1.9, 11.7), (4.8, -1.5, 17.4), (3.9, -3.5, 14.5), (5.0, -1.9, 11.7)]], ... ['06:01:2024', [(6.5, -1.5, 15.0), (7.1, -1.7, 14.0), (5.1, -0.8, 13.6), (6.7, 0.3, 14.0), (7.1, -1.7, 14.0), (5.1, -0.8, 13.6)]], ... ] >>> tmo = temperatures_data(estL, tempL) >>> pprint(tmo) [['10:01:2024', 0.7, 'Olot'], ['09:01:2024', -6.7, 'Olot'], ['08:01:2024', -7.2, 'Girona'], ['07:01:2024', -4.8, 'Girona'], ['06:01:2024', -1.7, 'Anglès']] >>> tempL = [] >>> tmo = temperatures_data(estL, tempL) >>> tmo []