Skip to content
English
  • There are no suggestions because the search field is empty.

What Is the Purpose of the Pass Statement?

The pass statement is used when there's a syntactic but not an operational requirement. For example - The program below prints a string ignoring the spaces.
 
var="Si mp le"

 

for i in var:

 

if i==" ":

 

pass

 

else:

 

print(i,end="")