lundi 23 août 2021

Getting error while using the random choices function

I'm trying to open random links using

webbrowser.open(random.choices("link1","link2","link3")

but it's showing error Check it out and help me resolve this issue.

My code:

webbrowser.open(random.choices("https://www.youtube.com/watch?v=YGf8JJZM_Yg", "https://www.youtube.com/watch?v=upsF9NULamA"))

Error I am facing:

    total = cum_weights[-1] + 0.0   # convert to float
TypeError: can only concatenate str (not "float") to str



Aucun commentaire:

Enregistrer un commentaire