What is the use of the "exec" function in Python?