python for i in range if else