read the text from file.txt and count the number of each alphabets in that and out put should be like a=2 ( if there are 2 a's) and b=6 (if there are 6 b's) so far i have done this much, this prints every alphabet but i want to print alphabets which exists only.
f= open('cipher.txt')
word= " ".join(line.strip() for line in f)
word=word.lower()
alpha="abcdefghijklmnopqrstuvwxyz"
alpha=list(alpha)
for i in alpha:
print(i+"="+str(word.count(i)))
But if any alphabet which is 0 times used i dont want to print that,, how to fix this? Help PLEASE