In this case:
swag = True
i = 0
while swag:
i=i+1
print(swag)
if i == 3:
swag = False
Will the while loop exit after 3 turns?
Does while swag – check if swag exists or if swag is True
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
while swag:will run whileswagis “truthy”, which it will be whileswagisTrue, and will not be when you setswagtoFalse.