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