We need to create a cursor object now.
We get the cursor object by calling the cursor() method of connection:
cursor = connection.cursor()
An arbitrary number of cursors can be created.
The cursor is used to traverse the records from the result set.