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