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?

Tweet Share WhatsApp

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)

Download Python Developer PDF Read All 77 Python Developer Questions
Previous QuestionNext Question
Tell me what Flask is and its benefits?Explain me what Are The Principal Differences Between The Lambda And Def?