I'm having trouble getting this program to keep going through the lines in the first loop. It just prints out the output for the first (searchline) and stops. Can anyone help me to figure out why it won't keep reading the lines in the birthday file?
import string
def find():
inPiDigits = open("pidigits.txt", "r")
inBirthday = open("birthday.txt", "r")
blength = len(open("birthday.txt").readlines())
length = len(open("pidigits.txt").readlines())
for line in range(blength):
searchline = inBirthday.readline()
for lines in range(length):
linePiDigits = inPiDigits.readline()
search = linePiDigits.find(searchline[:6])
if search >=0:
print lines+1, search
find()