I want to read a simple list from a file. But can't separate list elements from one another.
Here's my file:
"11","Arial","red","white","black","200x200","My Project"
Here's my read function:
def fread(file_name):
user_file=open('{}'.format(file_name),"r")
file_content=user_file.read()
user_file.close()
return str(file_content)
Here's the part that does not work:
conf_file=fread("settings")
conf_file.split(",")
print(conf_file[2])
This returns 1 instead of red