Computer Science, asked by Agnibesh7060, 9 months ago

Give the output of the following state-ments :
>>>str = ‘Honesty is the best policy"
>>>str.replace (‘o’.’*’)

Answers

Answered by rahul9173
0

Answer:

I am not understand the concept I read in class 10

Answered by gratefuljarette
0

The output of the above source code would be H*nesty is the best p*licy.  

Explanation:

  • The replace method is used in Python to replace the occurrence of old with new in a string in which we set the maximum condition. The maximum is the optional condition in the above function. It is just used to denote the number of character of occurrences what we need to change.
  • In the above source code. Old=”o” and new =”*” and max=optional. In the above source code “o “character is replaced by a special character “*”.

Learn more about Python

Write any two features of python that make it user friendly

brainly.in/question/9677174

In how many different ways, can you work in python?

brainly.in/question/9479066

Similar questions
Math, 1 year ago