I was wondering if it's a good idea to use { var }
in place of :var
as placeholder?
This is what I see in CS50 notes:
flight = db.execute("SELECT * FROM flights WHERE id = :id", {"id": flight_id}).fetchone()
This is what I am comfortable doing:
flight = db.execute(f"SELECT * FROM flights WHERE id = { flight_id }").fetchone()
In security point of view, is my way alright?