A stored procedure in Python is a block of code that is stored in the database and can be executed when needed. It is used to perform specific tasks or operations on the database.