0 votes
in Education by (1.7m points)
webbrowser.open('https://api.WhatsApp.com/send?phone=number')

I want to send WhatsApp messages to numbers without adding them contact using python.

so I used upper code in my program but I want to ask that, I am making a tkinter project, in my >>>program cph is phone number variable and I also called cph.get() function but how can I use

this cph variable in this link.

Select the correct answer from above options

1 Answer

0 votes
by (1.7m points)
 
Best answer
You can define your link before opening it.

link = "https://api.WhatsApp.com/send?phone=" + variable

webbrowser.open(link)

Learn data science with python course to improve your technical knowledge.
...