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