no idea why my program is not reading the text file correctly am I doing something wrong,
here is what i have so far
import string
count = 0
infile = open("text.txt", "r")
uppercasecount, lowercasecount, digitcount = (0, 0, 0)
def main():
for character in infile.readlines():
if character.isupper() == True:
uppercasecount += 1
if character.islower() == True:
lowercasecount += 1
if character.isdigit() == True:
digitcount += 1
print(uppercasecount, lowercasecount, digitcount)
print("Total count is %d Upper case, %d Lower case and %d Digit(s)" %(uppercasecount, lowercasecount, digitcount))
main()