79377305

Date: 2025-01-22 10:18:20
Score: 0.5
Natty:
Report link

You need to strip the string and call the title method, here is a simplified method assuming you do not want to keep the whitespaces.

s = "\n\n\n\n first letter is to be capital"

sTitle = s.strip()

print(sTitle.title()) #First Letter Is To Be Capital
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Melvin Kosisochukwu