conn = mysql.connector.connect(host="localhost", user="root", password="", database="Attendance") my_cursor = conn.cursor()
my_cursor.execute("select Name from student where Student_id=" str(id))
n=my_cursor.fetchone()
n=" ".join(n)
CodePudding user response:
Please check the value of n
before joining if it is an iterable. Probably it’s None
.