๐Ÿ“– Beginning Python Programming /
Module: Files Operation

More file object operation

๐Ÿ“– Beginning Python Programming / Files Operation / More file object operation

Reading Plain Text File with read and splitlines

with open("guests.txt", "r") as file_obj:
    result = file_obj.read().splitlines()

print(result)