in below code, when offset becomes 0, which means offset becomes False then even after printing “correcting…”. it prints 0
offset = 8
while offset:
print(“correcting…”)
offset=offset-1
print(offset)
why does it executes print(offset) and print 0, even after offset becomes False ?
New contributor
B.Pandya is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.