Define Range Function In Python Syntax Error