Untitled
unknown
python
a year ago
304 B
16
Indexable
myfile = open('what_is_python.txt ', 'r')
line = myfile.readline()
counter = 0
while line != '':
print(line)
for word in line.split():
# print(word)
if word == 'Python':
counter += 1
line = myfile.readline()
print(counter) Editor is loading...
Leave a Comment