Update inversion3.py