Using A Function In A Loop Python Script Editor