Level 10 : Output of the following?


def f():
    return [lambda x: i + x for i in range(3)]

funcs = f()
print(funcs, funcs, funcs)

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