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