guess = int(guess). Not clear about the usage of this statement
If we have already used
if guess.isdigit()
then why are we using,
guess = int(guess)
Digit is already an integer then why are we converting it
2 answers ( 0 marked as helpful)
Python String isdigit() method is a built-in method used for string handling. The isdigit() method returns “True” if all characters in the string are digits, Otherwise, It returns “False”.
why we use guess = int (guess) ? still not understand this .