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