Here’s the code i did:
list = input("Enter the number: ")
p = print("Trailing zeroes = ")
print(p, list.count("0"))
Output:
Enter the number: 10000
Trailing zeroes =
None 4
The output i wanted:
Enter the number: 10000
Trailing zeroes = 4
>Solution :
Taking into account @OldBill ‘s comment:
This code do not count the trailing zero but rather the total amount of zeroes. I’m not deleting the answer as it offers a solution to OP’s main problem, as stated in the question
With
list = input("Enter the number: ")
p = print("Trailing zeroes = ")
print(p, list.count("0"))
What you do is p = print("Trailing zeroes = ") which is not a value.
either you should have
list = input("Enter the number: ")
p = "Trailing zeroes = "
print(p, list.count("0"))
or
list = input("Enter the number: ")
print("Trailing zeroes = ",list.count("0"))