Level 5 : What will be the output of the following code?


def fun():
    return[i for i in range(0,3,3)]
print(fun())

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