In the following program, why is the count function failing? I'M getting an error that it needs at leat one argument and that I have given it 0. I have here count(number), how is number no an argument? According to the documentation the start and end points are optional. I figured that just giving one argument, the whole string, would give me the count on the whole thing by default and thats what the documentation suggested to me.
#!/usr/bin/python3
import sys
while(str.isdigit(sys.argv[1]) == True):
number = sys.argv[1]
print(number)
print(str.count(str(number)))
exit
print("Input was not a number ", "formate as this -> ", sys.argv[0], " 123")