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