How to count number of occurrences of a chracter in a string (list)
<p>I'm trying to count the occurrence of each character for any given string input, the occurrences must be output in ascending order( includes numbers and exclamation marks)
  I have this for my code so far, i am aware of the Counter function, but it does not output the answer in the format I'd like it to, and I do not know how to format Counter. Instead I'm trying to find away to use the count() to count each character. I've also seen the dictionary function , but I'd be hoping that there is a easier way to do it with count() </p>

<pre><code>from collections import Counter

sentence=input("Enter a sentence b'y: ")
lowercase=sentence.lower()

list1=list(lowercase)
list1.sort()

length=len(list1)
list2=list1.count(list1)
print(list2)

p=Counter(list1)
print(p)
</code></pre>

<p>You could use the list function to break the words apart`from collections </p>

<pre><code>from collections import Counter

sentence=raw_input("Enter a sentence b'y: ")
lowercase=sentence.lower()

list1=list(lowercase)
list(list1)

length=len(list1)
list2=list1.count(list1)
print(list2)

p=Counter(list1)
print(p)
</code></pre>

python list count