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