Today I learned how to use JavaScript functions in PyScript.
Grab a piece of paper and try to fold your way out of this problem.