Python – Turn links into a string

I'm trying to make a string consisting of links. I create a string called "links" and then I use getpass module to paste a bunch of links into this string. I then print the string, just to check if it's working.

If I input either:

"CatDogFish" or "Cat:Dog:Fish" or "Cat/Dog/Fish"

The program prints the exact same as the input.

If I instead use the following input:
"https://www.google.com/https://www.youtube.com/https://www.facebook.com/"

It doesn't print anything... (It doesn't make a difference if I paste a single link or multiple links)

As seen with the CatDogFish example, neither colon nor slash seems to be a problem, but as soon as I paste an entire link, the program acts like I didn't input anything...

What is the problem? What am I missing?

enter image description here



Read more here: https://stackoverflow.com/questions/66270707/python-turn-links-into-a-string

Content Attribution

This content was originally published by Luke_Leon at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: