Answer the question
In order to leave comments, you need to log in
Working with files, why doesn't it output what I expected?
file = open('books.txt', 'r')
for lis in file:
f = 0
print(lis[f] + str(len(lis)))
H12
T16
P19
G18
H13
T17
P20
G18
Harry Potter
The Hunger Games
Pride and Prejudice
Gone with the Wind
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question