I'm making a program that counts the occurrences of each string in a file so I wrote this
f = open('strings.txt', 'r')
content = f.read()
mystr = list(content)
data = {k: mystr.count(k) for k in mystr}
print(data)
How do I print the output in a format like this for example
whitespace = 286
"e" = 204
"n" = 164
"i" = 156
"a" = 147