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