a (very) small improvement:

tot_time = 2 # total time in seconds for i in range(0, 360): mc.deg = i mc.set_needs_display() time.sleep(tot_time/360)