So i have to create a list that determines the amount of certain letters appear in a combination said above. For example letters from A to E repeats 57 times. How would i code this in python?Picture of the question
plzz help! and thank you
ive tried this already
# Input section
print("(1) Find the number of lines in a file.")
fin = open("inputFileAssig.txt", "r")
numLines = len(fin.readlines())
fin.close()
# Processing section
fin = open("inputFileAssig.txt&qu开发者_如何学Goot;, "r")
lstData = []
for index in range(0, numLines):
line = fin.readline()
line = line.replace("\n", "")
lstData.append(line)
print(lstData) # delete later
fin.close()
# Output section
精彩评论