Update main.py

Made more legible and simple the code