Level 1 : What will be the output of the following Python code?


x = [i**+1 for i in range(3)]; print(x);

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