Python Developer Question:
Explain me what Is The Statement That Can Be Used In Python If The Program Requires No Action But Requires It Syntactically?
Answer:
The pass statement is a null operation. Nothing happens when it executes. You should use “pass” keyword in lowercase. If you write “Pass” you’ll face an error like “NameError: name Pass is not defined.” Python statements are case sensitive.
letter = "hai friend"
for i in letter:
if i == "a":
pass
print("pass statement is execute ..............")
else:
print(i)
letter = "hai friend"
for i in letter:
if i == "a":
pass
print("pass statement is execute ..............")
else:
print(i)
Previous Question | Next Question |
Tell me what Flask is and its benefits? | Explain me what Are The Principal Differences Between The Lambda And Def? |