Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions