PSA: the tool you code with matters more than the code itself.
MicroPython is a well-known and easy-to-use way to program microcontrollers in Python. If you’re using an Arduino Uno Q, ...