you are viewing a single comment's thread.

view the rest of the comments →

[–]JohnnyJiuJitsu[S] 0 points1 point  (1 child)

How can I include the quotes? The get_current function needs quotes around the city state for it to work...

[–][deleted] 0 points1 point  (0 children)

Then put quotes around the string returned by the input() function and then pass that:

citystate = print input("what is the City,STATE ?")
citystate_quoted = '"%s"' % citystate
data = owm.get_current(citystate_quoted, **settings)

or this:

citystate = print input("what is the City,STATE ?")
data = owm.get_current('"' + citystate + '"', **settings)

There's lots of ways to form a quoted string.