MCQs > IT & Programming > Python > How would you convert the string below to title case and remove all heading/trailing spaces ? myStr = ' ThIs iS a samPle String. '

Python MCQs

How would you convert the string below to title case and remove all heading/trailing spaces ? myStr = ' ThIs iS a samPle String. '

Answer

Correct Answer: myStr.title().strip()

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it