What is the output of print('Python'.replace('P', 'J')) in Python?
print('Python'.replace('P', 'J'))
Correct answer
C. Jython
5 views
C. Jython
5 views
replace() returns a new string with occurrences replaced.
Asked in: Python Interview Strings
https://docs.python.org/3/library/stdtypes.html#string-methodsNot sure why the answer is C? Ask here and get an explanation.