There are several ways to write data to a file. Pick the one you find easier and write a list of numbers into the file_with_list.txt.
The list with numbers is defined below. Please write the whole list including brackets and don't add a newline character \n to the end of the file.
Convert the list to a string with
str(your_list) and use the file.write() method, it doesn't add a newline character at the end. Alternatively, use print() with the correctly specified end argument.