[EMAIL PROTECTED] wrote:
> I am having trouble getting the string.count function to work. I want it to
> count the amount of digits (0 or 1) in the string, but I keep getting an
> error stating the string.count was expecting a character buffer object.
> CODE:
> count = string.count(conversion(n),["0","1"])

If conversion(n) is already a string containing only 0 and 1 you could 
just use  len(conversion(n))

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to