Define Range Function In Python For Loop