SyntaxFix
Write A Post
Hire A Developer
Questions
file = open("filename.txt", newline='') for row in self.data: print(row)
Save data to a variable(file), so you need a with.
file
with