15
Last seen 3 years ago
Member for 7 years, 3 months, 12 days
Difficulty Normal
You can return directly as return num % 2 == 0 since conditional statement will give True or False
More
I don't think you need this if block.
if text[0].isupper() is False:
splitText = text.split(" ")
splitText[0] = splitText[0].capitalize()
text = ' '.join(splitText)
this is equivalent to simply returning text.capitalize() since capitalize work on whole string.
From Python d
More