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