List object has no attribute strip : learnpython
www.reddit.com › r › learnpythonwith open ("customer.txt", "r") as oldFile: for line in oldFile: print (line.strip ()) 1. level 1. lanemik. · 3y mikelane. The output of line.split () is a list and lists do not have a strip () method. I'm not super clear what you're attempting to do here. Calling the split () method should eliminate the need to do any kind of strip operation ...