Level 1 : What will be the output of the following python code?


y = 6
z = lambda x: x * y
print z(8)

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