Question: a. Define a function replace_abc(str1, char1) that takes a string str1 and a single character char1 as input. The function returns an updated string, where

a. Define a function replace_abc(str1, char1) that takes a string str1 and a single character char1 as input. The function returns an updated string, where all occurrences of the letters a, b, or c have been replaced by char1.

b. Define a variable mystr = It is a book about abcs and print mystr

c. Call the above function with the string mystr and the single character * as inputs and print the value of returned by the function.

Here is a sample output

a. Define a function replace_abc(str1, char1) that takes a string str1 and

Python 3.5.2 Shell File Edit Shell Debug Options Window Help RESTART Ca /U /106 /LABS /l a sers/Arunita/Dropbox. basol.py It is a book about a bc' s It is ook out s Ln: 208 Col: 74

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!