213
321
3213 11
12
41 21 412 12 123 321 11
11 321
212 11
count = 0
with open('my_file.txt') as f:
lines = [line.rstrip() for line in f]
for line in lines:
for elem in line.split(' '):
if elem == str(11):
count += 1
print(count) #--> 4
with open('file.txt') as f:
contents=f.read()
print(contents.count('11'))