Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python exit if statement

def some_function():
    if condition_a:
        # do something and return early
        ...
        return
    ...
    if condition_b:
        # do something else and return early
        ...
        return
    ...
    return

if outer_condition:
    ...
    some_function()
    ...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #exit #statement
ADD COMMENT
Topic
Name
4+7 =