Exercise 35
Write a Python algorithm that take an url as input and return it as clickable link address.
Solution
# Example of url url = "https://www.my-courses.net" # Transforme the url into a link link = f"{url}" print(link)
Explanation:
- The program uses an f-string: to create a variable link containing the HTML string for a hyperlink.
- The url variable: is inserted into the string both as the address and the display text for the link.
- The output will be: https://www.example.com.
Younes Derfoufi
my-courses.net