New: Practice Python, JavaScript & SQL with AI feedback — Try ActiveSkill free →

Day 7, Bug Fixing Exercise 1

Explanation

A new line was added to the code to convert the numbers of the list to strings so they can be written to the text file:

temperatures = [str(i) + '\n' for i in temperatures]


Recommended Course

Python Mega Course: Learn Python in 60 Days, Build 20 Apps
Learn Python on Udemy completely in 60 days or less by building 20 real-world applications from web development to data science.