To train a flea, begin with a jar and a lid.
Place the flea in the jar, twist the lid on top, and the flea jumps all the way to the top, hitting the lid again and again. Over time, you’ll notice that the flea continues to jump but no longer high enough to hit the top.
At this point, you can take the lid off the jar. The flea will never again jump high enough to jump out of the jar. They can’t. They have trained themselves to jump only so high, and once trained, that’s all they’re able to do.