I am trying to call on the main for this code. This is for an assignment so an explanation if possible is appreciated.
The goal is to put the file a list then have a user enter a number and determine if the number is valid by comparing it to the list.
I get a syntax error on line 34.
def read_File(open_file):
numList = []
number = int (input('Enter the account number to be validated:'))
try:
#declare the dirstring to hold the directory path
dirString = 'CH07/Lab'
#name of the file
fileString = '5-ChargeAccounts.txt'
#open the file for reading
infile= open (dirString + fileString, 'r')
#read all the lines in the file
numList = infile.readlines()

