<filename>db_con.py
import pymysql

db = pymysql.connect("localhost", "root", "", "db_tweepy")
cursor_db = db.cursor()

<filename>db_con.py
import pymysql

db = pymysql.connect("localhost", "root", "", "db_tweepy")
cursor_db = db.cursor()
