43.5k views
5 votes
"Hello".isalpha()

What is the output of the above code?
a. Hello
b. True
c. False
d. Error

1 Answer

4 votes

Final answer:

The output of the code "Hello".isalpha() is True.

Step-by-step explanation:

The output of the code "Hello".isalpha() is True. The isalpha() method is used to check if all the characters in a string are alphabetic. In this case, the string "Hello" consists of only alphabetic characters, so the output is True. If the string had contained any non-alphabetic characters, the output would have been False.

User Nabeel Ahmed
by
8.3k points