Exercise 35
 Write a program in Python that allows you to transform a given url address into a link.

Solution

# Ask user to type an url
url = input("Type an url :")
# Ask user to type a text of url link
text_lien = input("Type a text of link")
# convert the url text to a link
url = " " + text_lien + ""
print("The text with link is : ", url)
"""
Example
Type an url :https://www.my-courses.net
Type a text of link My Courses
The text with link is : < a href="https://www.my-courses.net/" > My Courses< / a >
"""
Younes Derfoufi

Leave a Reply