cara membaca dari file ke dalam daftar di Python
f = open(filename, "r")
listItems = f.read().splitlines()
Dull Dunlin
f = open(filename, "r")
listItems = f.read().splitlines()
# read file in a string list
with open(fileName) as f:
lineList = f.readlines()
with open('file1.txt','r+') as f:
lines=f.read().splitlines()
print(lines)