inFile = open("subjects.txt","r")
global subArray
subArray = []
global line
for line in inFile:
subArray.append(line)
inFile.close()
return subArray
This how I get the data when in is in different lines in the text file like
math
science
art
I need to know how to do it when the data is in one line
math , science , geography