In python I am trying to pass variables into the connect method like below,
cnx = mysql.connector.connect(user="%s", password="%s",host="%s",database="%s") % (dbuser,dbpassword,dbhost,dbdatabase) (port is missing)
What would be the best way to pass values into this kind of method ?
You can create a dictionary and deliver keyword arguments by unpacking it: