How to create a table function is not runing in ju

Import Database API

import pymysql

Database connection function

 def CreateConn():
             return Pymysql 

connect(host=“localhost”,Database=“learnvern”,
user=“root”, password=“system”,port=3306)

def createtable():
conn = conn.cursor()
cursor = conn.cursor()
query = "create a table student (sid int
primary key auto.increament, name
VARCHAR(50),mail VARCHAR (50),city
VARCHAR(50) )
cursor.execute(query)
conn .commit()
print(“TableCreated”)
conn.close

Create Table() # calling a create Table function