D
D
dontgiveafcuk2018-02-26 20:06:12
Python
dontgiveafcuk, 2018-02-26 20:06:12

If a match is found in the first if how to stop the elif check?

Let's say:
if 'condition_type_1' and 'condition_type_2'
do something
elif 'condition_type_1
How can I make sure that the code in the elif block is not executed if a match is found in the if ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xDimus, 2018-02-26
@xDimus

it is not executed anyway if the first condition is true, elif is else if
, for more confidence, you can add a break ))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question