I'm trying to code my Pygame game so the player falls anytime it's not touching the floor. The problem is that the way to code it to test if the player y coordinate is lower that 0, and then stop the falling process, but cuadratic function is not always going to get to the exact y = 0, since it travels more pixel each frame, maybe the first value that is lower than 0 is -10. And then the player ends up under the screen.
I thought about testing if the player's y coordinate is lower that 0, and then teleporting him to y = 0 but that feels like a really non elegant solution and it also makes the player teleport for a frame.
"I thought about testing if the player's y coordinate is lower that 0, and then teleporting him to y = 0, but that feels like a really non elegant solution"

This is the usual way. The collision stops the player from falling.

"it also makes the player teleport for a frame."

No it doesn't. You have to "teleport" the player plyer after the collision detection and before you draw it.
You do the collision detection once in every frame. Once a collision is detected, you know that the player has hit an object at some point while moving  since the last frame. Instead of calculating the exact time when the player hits the object and stopping movement, you limit the player's position by the object.
How to overcome the problem of sprite trespassing floor due to acceleration in Pygame?