Scans COM Ports and return the port number of devices connected. Useful for integrating python and arduino. Feel free to use this code, I've written this because I'm too lazy to always check what COM port my arduino leonardo is in.
Also, posted this in stackoverflow: Stackoverflow: https://stackoverflow.com/a/66266626/2826801