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

Leave a Comment

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