Level 9 : What will be the output of the following code


def abc(a, b):
   return b if a == 0 else abc(b % a, a)
print(abc(20, 50))

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