text = [] fp= open("Add Your File path Here/Read-Text.php") data = fp.read() fp.close() print(repr(data)) data = data.split('\n') print(data)
Output:
Python beginners - ProgramPython beginners - Program
100+ Python Pattern Examples