John Stiner John Stiner - 1 year ago 121
Python Question

Creating a hyperlink in Python

I'm trying to create a hyper link in python that includes string and variables but i keep getting a syntax error, I think its probably because of quotations but I cant seen to figure it out. Thanks for the help.

'<a href="'str(p['latitude']+'+'+str(p['longitude']))'">Click Here</a>'})

Answer Source

Assuming both Latitude and Longitude are Integers:

'<a href="'+str(p['latitude'])+'+'+str(p['longitude'])+'">Click Here</a>'

Try This.

Your mistake is that you are not concatenating the strings properly.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download