MCQs > IT & Programming > Python > Read the following statements: >>> import string >>> str = 'Mary had a lamp in her Hand' >>> str = string.replace(str, 'ha', 'stan') >>> str Which of the following will be the output?

Python MCQs

Read the following statements:

>>> import string
>>> str = "Mary had a lamp in her Hand"
>>> str = string.replace(str, 'ha', 'stan')
>>> str

Which of the following will be the output?


Answer

Correct Answer: Mary stand a lamp in her Hand

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