please ignore conrad's terrible advice. he was tired yesterday. using string formatting in sql statements is a terrible idea because it opens you up to SQL injection attacks.
instead, you should replace your values with a placeholder character "?", and then pass your parameters to cur.execute
as a second argument, in a tuple, like this:
cur.execute(
"UPDATE table SET user_name=?, age=?, country=? WHERE user_id=?)",
(name, age, country, id)
)
More info here: https://docs.python.org/3.5/library/sqlite3.html.
If you're using mysql or postgres instead of sqlite, they may use a different placeholder character instead of the "?"