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