0 votes
in Python Flask by
What is the pass statement in Python?

1 Answer

0 votes
by
There may be times in our code when we haven’t decided what to do yet, but we must type something for it to be syntactically correct. In such a case, we use the pass statement.

>>> def func(*args):
pass
>>>
Similarly, the break statement breaks out of a loop.

>>> for i in range(7):
if i==3: break
print(i)
1

2

Finally, the continue statement skips to the next iteration.

>>> for i in range(7):
if i==3: continue
print(i)
1

2

4

5

6

Related questions

0 votes
asked Apr 27, 2023 in GoLang by Robin
0 votes
asked Sep 6, 2022 in AWS by sharadyadav1986
...