Count number of character available in String | python


Count number of character available in String # Python

name=input(“enter your name:”)


temp_name=""for i in range(len(name)):
if name[i] not in temp_name:
print(f"{name[i]}:{name.count(name[i])}")
temp_name+=name[i]
i+=1

Count number of character available in String | python

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories

You have successfully subscribed to myprogrammingschool

There was an error while trying to send your request. Please try again.

My Programming School will use the information you provide on this form to be in touch with you and to provide updates and marketing.