Why Is Your .isalpha Method in Python Allowing “*” and Other Punctuation?

Problem scenario
You have a Python program that is evaluating one-character strings of punctuation as "True" when tested by the .isalpha method. What should you do?

Solution
Remember to use "()" after .isalpha().

Leave a comment

Your email address will not be published. Required fields are marked *