Question: IN PYTHON, Write a function, addTag(s, tag) that takes a string, s, and another string, tag, and returns a new string the surrounds the string

IN PYTHON, Write a function, addTag(s, tag) that takes a string, s, and another string, tag, and returns a new string the surrounds the string s with an html style tag. An HTML tag consists of a left angle bracket, the tag, and the right angle bracket. HTML tags come in pairs and the second one has a "/" before the tag. Study the following examples to see how it should work: addTags("Hello", "pre") should return the string '

Hello 

' addTags("Some more text", "bold") should return the string 'Some more text'

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!