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