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