I am trying to concat output of a sql output to a string as below:
dwh_cur.execute("""select name from sales where id = 123""")
name = dwh_cur.fetchone()[0]
a = print(name)
b = str(a) + " is the name of the agent"
print(b)
The above returns
None is the name of the agent
Expected output:
Steve is the name of the agent
a =, i.e.:print(name); b = f"{name} is the name of the agent"