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