Update main.py

lengthSquared used