>>> from temperatura import canvi_temp --ini-enunciat >>> it= iter([(1, 12), (2, 12), (3, 13), (4, 13), (5, 15), (6, 15), (7, 18)]) >>> itt= canvi_temp(it, 1) >>> next(itt) 5 >>> next(itt) 7 >>> next(itt,'final' ) 'final' >>> it1= iter([(1, 12), (2, 12), (3, 15), (4, 15), (5, 18), (6, 19), (7, 18), (8, 21), (10, 24), (15, 25)]) >>> itc= canvi_temp(it1, 2) >>> next(itc) 3 >>> next(itc) 5 >>> next(itc) 6 >>> for x in itc: ... print(x, end=',') 8,10,15, --fi-enunciat >>> it1= iter([(1, 12), (2, 12), (3, 15), (4, 15), (5, 18), (6, 19), (7, 18), (8, 21), (10, 24), (15, 25)]) >>> itc= canvi_temp(it1, 1) >>> next(itc) 3 >>> next(itc) 4 >>> next(itc) 5 >>> for x in itc: ... print(x, end=',') 6,8,10,15,