In my code I have a list called euler22.txt:
with open('euler22.txt') as f:
name_list = f.read().splitlines()
euler22.text
is a long file, but I'll post the first 5 values in it:
"MARY","PATRICIA","LINDA","BARBARA","ELIZABETH"
As you can see, it's structured as a list, but when I run the code the way I have it, it says that the length of name_list
is only 1 - whereas I want it to be 500 (the length of the list). How can I make my code open this file as a list that is the length of how it's structured in the file?