python code creating animation