QUESTION IMAGE
Question
which string method returns true if the character is a numeric charcter? letter = input(\enter a letter: \)
○ isdigit(letter)
○ letter.isdigit()
○ isdigit(letter)
○ letter.isdigit()
Brief Explanations
In Python, the isdigit() method is a string - method. It is case - sensitive and returns True if all characters in the string are digits and there is at least one character. The correct syntax to call it on a string variable (here letter) is letter.isdigit().
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
D. letter.isdigit()