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