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