Level 1 : What is the output of following code?


r = lambda q: q * 2
s = lambda q: q * 3
x = 2
x = r(x)
x = s(x)
x = r(x)
print (x)

Author: VenuEmmela | Tags: operator | 1736+ Python FAQs | Share
while-else-loop | decorator | thread | bitwise | fabs-function | list-operation | bitwise-operator | zip | staticmethod | postfix | lambda-function | complex-number | python-history | __init_subclass__ | data-type | range | list | polymorphism | inherit | virtual-environment | data-structure | __future__ | string-iteration | operator | nested-loop | list-comprehension | method | integer | deep-copy | turtle | filter-function | scientific-notation | formal-and-actual-parameter | append | numpy | comprehension | python-repl | enumerate() | list-indexing | control-flow | class-and-object | built-in-function | boolean-and-non-boolean | typeerror | touples | expand-tab | methods | threading | operator-and | condition | multithreading | logical-operator | dictionary | oops | mutable | sum-function | gil | object-attribute | mathematics | installation | list-slicing | functional-programming | round | def | type-conversion | conversion | python | keyword | conditional-statement | variable | heap-memory | choice | asyncio-module | python_version | yield | iterator | comparison | mysql | matrix-list-comprehension | operator-or | random-function | string-method | function-argument | update | logical-operator | feature | datetime | class-and-instance-variable | loop-control | library | control-flow | boolean | global-keyword | functions | data-structures | design-principle | data-type | head-and-tail | filter | min-max-function | static-method | assert | encapsulation | tuple | lists | application | oop | pandas | exception | compute | indentation | arithmetic-expression | regex | string-manipulation | sys | context-manager | asyncio | multiprocessing | zfill-function | input | file | memory | access-modifier | pep | sorting | binary | binary-operation | class | version | assignment-operator | id-function | join | immutable-data-type | set | attribute | virtual-environment | basic | raise | operations | tuple-unpacking | mapping-function | overflow | __all__-attribute | swapping | type-conversion | expression | benefit | inheritance | indexing | logical-operation | list-mutation | slice | global-variable | recurssion | lambda | function | generators-in-python | with-statement | control-statement | int | operand | classes | arithmetic-operation | namedtuple | python-django | shallow-copy | else-statement | list-comprehension | print | collections | recursion | slicing | print-statement | sum() | decimal | factorial-function | string-concatenation | syntax | split | software-design | escape-operator | while-and-for-loop | debugging | string-formatting | match | syntaxerror | complex | conditional-statement | datatype | operator-overloading | operators | default-mutable-argument | matplotlib | map-function | pseudocode | data_structure | for | loop | import-method | dictionaries | copy | invalid-list | error-handling | function-and-scope | python-module | counter | input-function | implementation | multiple-inheritance | syntax-error | stack | frozenset | regular-expression | zip-function | loops | pickling-&-unpickling | generator | dicts | format | statement | generators | call | version-check | math | numeric | memory-management | syntax-error | type_conversion | destructor | class-and-inheritance | higher-order-function | data-structure | odd-number | collection | identity-operator | input-function | max-min | matrix | string-method | constructor | bitwise-operator | list-method | interpreter | lambdas | list-vs-tuple | center | module | exception-handling | global-variable | list-join | built-in | precedence-and-associativity | async | return-statement | error | docstring | string-slicing | immutability | built-in-function | string | mathematical-function | init | set-operation | exception-handling | goto-function | round-function | array | counter-function | floating-point-precision | math-copysign | comment | file-handling | magic-method | exponentiation | file-handling | parameter | descriptors | global | identity-operator | sorted | string-slicing | rollback | objects | min-function | command-line-parsing | identifier | while-loop | package-management | file_handling | name-mangling | iterable | random | namespace | sys-module | encoding | string-formatting | precedence ...