Hi im trying to create a list adding to it via a for loop reading line by line from a txt file. Im getting a syntax error on the list but am unsure about how to fix the problem ???
import re
file = open("text.txt","r")
text = file.readlines()
file.close()
line_count=0
for line in text:
User_Input_list[] += [] + line.split()
line_count += 1
the problem seems to be on the second last line with the declaration of the list