account_id = 456
sql = """
    SELECT * FROM customers 
    WHERE CustomerId = %(customer_id)s 
        AND AccountID = %(account_id)s
        AND ExtraID = %(customer_id)s\"
"""
params = {'customer_id': customer_id, 'account_id': account_id}
How do I use SQL parameters with python?