Depends on your definition of fun, but I've used text books to give me practice exercises, instead of having to invent problems myself. (It's also a good way to learn a language's way of working, rather than learning how to implement your old thought patterns in a new language.)
Something like SICP has problems that are fairly interesting from a mathematical perspective as well as a coding one. I don't know if there's the equivalent for Python, but it might be worth checking.
Something like SICP has problems that are fairly interesting from a mathematical perspective as well as a coding one. I don't know if there's the equivalent for Python, but it might be worth checking.