Usefulpy site is not always up to date
Download and Import
pip install usefulpython
Filled with simple resources and modules for a cleaner looking program, Usefulpy is a module filled with many useful functions and modules in various subjects geared to cut down and simplify some little bits of code that can become messy or repetitive.
So instead of checking, say
float(x) == int(float(x))
You can check it as
def is_integer(s): '''Check if an object is an integer can be turned into an integer without losing any value''' try: return int(float(s)) == float(s) except: return False
Simple, but works well and can be used in a variety of situations.
Essentially, usefulpy is a large library of functions that improve the quality of python programming. One catch, it can't use any sort of third party libraries... so no numpy, scipy, manim, or any others...