>>> from holidays import holidays >>> lt1 = ['Greece\n', 'J. Smith-double-9-Santorini-Mykonos-Rhodes\n', 'A. Jones-single-8-Athens-Mykonos-Rhodes-Mycenae\n', 'B. Garcia-double-12-Santorini-Athens-Mykonos-Rhodes-Ephesus-Mycenae\n', 'J. Clark-single-9-Athens-Rhodes-Ephesus-Mycenae-Thessaloniki\n'] >>> with open('greece.txt', 'w') as f1: ... f1.writelines(lt1) >>> dextra_gr = {'Santorini': 90, 'Athens': 100, 'Mykonos': 85, 'Mycenae': 110, ... 'Rhodes': 120, 'Ephesus': 115, 'Thessaloniki': 75} >>> holidays('greece.txt', dextra_gr, 106, 'gr_bills.txt') >>> with open('gr_bills.txt', 'r') as g1: ... out1 = g1.read() >>> out1 'J. Smith: 1249€\nA. Jones: 1432€\nB. Garcia: 1892€\nJ. Clark: 1664€\n' >>> lt1 = ['Italy\n', ... 'J. Puig-double-10-Rome-Florence-Pisa-Siena\n', ... 'A. Biden-single-15-Rome-Florence-Portofino\n', ... 'E. Mebarak-double-14-Rome-Naples-Capri\n', ... 'R. Silloni-double-21-Rome-Naples-Amalfi-Capri\n', ... 'T. Lopez-single-18-Rome-Florence-Pisa-Portofino\n', ... 'G. Kasparov-single-9-Rome-Naples-Capri-Pompeii\n', ... 'S. Watson-double-9-Rome-Florence-Pisa-Siena-San Gimignano\n', ... 'D. Trumpet-double-12-Rome-Naples-Pompeii-Ercolano-Vesuvius\n', ... 'M. Holmes-single-8-Rome-Naples-Vesuvius\n', ... 'G. Casademunt-double-20-Rome-Florence-Pisa-Siena-Portofino\n'] >>> with open('italy.txt', 'w') as f2: ... f2.writelines(lt1) >>> dextra_it = {'Rome': 90, 'Florence': 150, 'Pisa': 120, 'Siena': 130, ... 'Portofino': 180, 'San Gimignano': 125, ... 'Naples': 120, 'Amalfi': 150, 'Capri': 130, 'Pompeii': 140, ... 'Ercolano': 145, 'Vesuvius': 155} >>> holidays('italy.txt', dextra_it, 123, 'it_bills.txt') >>> with open('it_bills.txt', 'r') as g2: ... for line in g2: ... line 'J. Puig: 1720€\n' 'A. Biden: 2634€\n' 'E. Mebarak: 2062€\n' 'R. Silloni: 3073€\n' 'T. Lopez: 3196€\n' 'G. Kasparov: 1808€\n' 'S. Watson: 1722€\n' 'D. Trumpet: 2126€\n' 'M. Holmes: 1545€\n' 'G. Casademunt: 3130€\n'