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