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