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