Level 1 : What is the purpose of the elif statement in Python?

Author: bhavani | Tags: conditional-statement | 1859+ Python FAQs | Share
functions | binary | attribute | datatype | working-with-dates-and-times | complex | pickling--unpickling | list-slicing | advanced-file-operations | loop-control-statements | multiple-except-blocks | data_structure | method | list-operation | methods | escape-operator | creating-custom-modules | operations | matrix-list-comprehension | global-variable | lists | multiple-inheritance | python-repl | list-mutation | conversion | center | design-principle | object-attribute | class | aggregating-data-with-functools.reduce() | matrix | random-function | decimal | arbitrary-arguments-(*args,-**kwargs) | benefit | filter | min-function | choice | error-handling | numpy | multiple-inheritance | invalid-list | context-manager | expand-tab | descriptors | call | precedence-and-associativity | function | postfix | __init_subclass__ | odd-number | function-and-scope | fabs-function | objects | type_conversion | threading | control-statement | else | overflow | dataframe-and-series-objects | raise-statement | list-methods-and-slicing | while-and-for-loop | filtering-and-indexing | match | operator-or | working-with-file-paths | array | operand | datetime.date,-datetime.time,-datetime.datetime | dicts | yield | using-else-and-finally | writing:-write(),-writelines() | data-structure | working-with-temporary-files-using-tempfile | async | comparison | data-type | while-loop | working-with-binary-files-(rb,-wb) | encapsulation | virtual-environment | error-handling | managing-directories-with-os-and-shutil | string-manipulation | class-and-instance-variable | bitwise-operator | exception-handling | syntax-error | global-keyword | class-and-object | data-structure | syntaxerror | enumerate() | error | assert | tuple-methods | python-syntax-and-structure | round | data-types | regular-expression | inheritance | introduction-to-python | scientific-notation | dictionaries | functional-programming | encoding | introduction-to-multiprocessing | thread-synchronization | list-comprehension | range | append | zip | data-structures | reading-and-writing-files | single-inheritance | slice | pep | function-argument | tuples | zfill-function | default-mutable-argument | python-history | touples | data-structures-in-python | virtual-environment | asyncio-module | zip-function | string-formatting | global | classes | directory-operations | factorial-function | control-flow | deep-copy | booleans | docstring | expression | formatting-with-strftime | name-mangling | else-statement | while-else-loop | boolean | file_handling | feature | variable | int | why-use-multiprocessing-over-threading?-(gil) | operator | identity-operator | exception | strings | pseudocode | using-assertions-(assertequal,-assertraises) | conditional-statement | logical-operation | thread-safe-data-structures-(queue.queue) | list,-set,-and-dictionary-comprehensions | operators | operator-overloading | walking-through-directories-using-os.walk() | return-statement | using-map()-for-transformations | floats | pass | global-variable | complex-number | identity-operator | implementation | input-function | using-join()-and-is_alive()-methods | string-iteration | slicing | software-design | python | access-modifier | type-conversion | version | sys | print-statement | list-method | functional-programming | data-type | math-copysign | sorting-and-ranking | multiprocessing | regular-expressions | datetime | debugging | arithmetic-operation | generator | swapping | file | collections | regex | version-check | goto-function | comprehension | integer | def | type-conversion | collection | oop | loops | typeerror | data-type-conversions | polymorphism | sets | set-operation | min-max-function | recurssion | quantifiers-(*,-+,-?,-{}) | installation | parameter | exponentiation | control-flow | compute | formal-and-actual-parameter | handling-missing-values-(fillna,-dropna) | memory-management | logical-operator | indexing:-loc-vs-iloc | format | for | list-vs-tuple | max-min | default-arguments | iterators | class-decorators | syntax-error | comment | boolean-masking | dictionary-methods | membership-operators-(in,-not-in) | math | filter-function | loop-control | sorting | print | pandas | raise | opening-files-(open()) | mysql | interpreter | key-value-pairs | exception-handling | using-os-and-pathlib-modules | counter-function | assignment-operator | conditional-statement | boolean-and-non-boolean | memory | numeric | immutability | set | string-methods | oops | literal-characters-and-special-characters | module | generators-in-python | file-handling | list | magic-method | frozenset | matplotlib | built-in | method-overloading | integers | python_version | python-module | application | thread | file-handling | anchors-(^,-$) | shallow-copy | overriding-methods | reading-and-writing-large-files-efficiently | time-series-with-pandas | condition | generators | nested-loop | head-and-tail | assignment-operators | tuple | mapping-function | floating-point-precision | __future__ | lambdas | tuple-unpacking | command-line-parsing | input | intering | syntax | defining-functions | class-and-inheritance | immutable-data-type | built-in-function | mathematical-function | logical-operators | identifier | heap-memory | with-statement | asyncio | string | string-formatting | logical-operator | arithmetic-expression | lambda | decorator | gil | loop | keyword | turtle | import-method | unit-testing | identity-operators-(is,-is-not) | basic | multithreading | conditional-statements | inherit | namedtuple | joining-and-merging-dataframes | counter | list-comprehensions | stack | using-lists-as-stacks | dictionary | string-slicing | bitwise-operator | sum-function | lambda-functions | difference-between-threads-and-processes | constructor | recursion | iterator | sorted | update | namespace | higher-order-function | list-comprehension | operator-and | map-function | library | __all__-attribute | indentation | python-django | sys-module | built-in-function | id-function | using-the-threading-module | built-in-modules | string-method | parsing-with-strptime | precedence | destructor | round-function | staticmethod | init | list-indexing | split | copy | lambda-function | input-function | binary-operation | introduction-to-threads | mutable | using-yield-in-functions | dictionary-comprehensions | static-method | python-operators | string-slicing | bitwise | type-conversion-and-casting | iterable | sum() | creating-and-starting-threads | indexing | list-join | string-concatenation | statement | reading:-read(),-readline(),-readlines() | rollback | package-management | while-loops | test-discovery | string-method | mathematics | join | random ...