Light Mode
Dark Mode
why should 'else' have to be in the sentence?

return text[0].upper() + text[1:] + ('.' if text[-1] != '.') <- it's what i wrote. return text[0].upper() + text[1:] + ('.' if text[-1] != '.' else '') <- it's what i saw and right

is it essential to put if and else togather in a line?

Created: Feb. 8, 2019, 10:10 a.m.
Updated: Feb. 8, 2019, 12:32 p.m.
-1
11
User avatar
efillab