Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

stop a function from continuing when a condition is met python

# use return e.g
def test_function(input):
  if input == 5:
    return 
  else:
    print(input)
    
#f you run 
test_function(5)
#the function will simply just end

  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #stop #function #continuing #condition #met #python
ADD COMMENT
Topic
Name
5+1 =