Level 9 : What will be the output of the func(y=5, x=3) call?


def func(x=3,y=5):
    x=x+y
    y+= 1
    print(x,y)
func(y=5,x=3)

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