Dec-17-2017, 03:28 PM
(Dec-17-2017, 03:24 PM)wavic Wrote:def number_of_polluted_days(januar): k = defaultdict(int) for day, data in januar.items(): for city, pollution in data.items(): if pollution > 50: # at the first post you say that the condition is if the pollution is above 50? Anyway k[city] += 1 return v
Except it return k not v. See even the pro make mistakes
When my code doesn't work I don't know why **think** and when my code works I don't know why **think**