擅长:python、mysql、java
<blockquote>
<p>I need to take a number from the user, than print the count each digit is appear in the number.</p>
</blockquote>
<pre><code>#! /usr/bin/python3.2
n = input ("Please enter your number: ")
for digit in map (str, range (10) ):
print ('{} appears {} times in your number.'. \
format (digit, len ( [c for c in n if c == digit] ) ) )
</code></pre>