Visual Basic Or Function In Python Syntax For Loop