Smoke (2 points)

A campaign to give up smoking suggests smokers to analyse which day of the week they smoke more and which day they smoke less. They must build a nested list in which a sublist represents a week and has 7 numbers (int) corresponding to the number of cigarettes that they have smoked each day of the week, from Sunday to Saturday.

Write function smoke() that takes a list as that described and a list with the names of the days of the week (str), from Sunday to Saturday, and returns another nested list with the same length as the first one. Each sublist of the returned list contains the two names of those days of the week (str) in which the smoker has smoked more cigarettes and less cigarettes, respectively. If there is a repeated number of cigarettes, you must consider the first day of the week with this number.

Save this function in file smoke.py.

Examples:

>>> lsmoke1 = [[10, 8, 9, 6, 6, 9, 12], [12, 12, 8, 8, 8, 7, 8],
...            [10, 10, 9, 7, 7, 8, 9]]
>>> lweekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday',
...              'Friday', 'Saturday']
>>> smoke(lsmoke1, lweekdays)
[['Saturday', 'Wednesday'], ['Sunday', 'Friday'], ['Sunday', 'Wednesday']]

Note

More tests are provided in file test-smoke.txt.