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]
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.
