def main():
my_string = input("Enter a sentence: ").lower()
character = ""
count = 0
for x in my_string:
if x.isalpha():
if my_string.count(x)>count:
count = my_string.count(x)
character = x
print("The most popular character,",character,"appears",count,"time(s)")
main()
I wrote my code in python 3.8. I hope this helps