Level 9 : What is the main difference between these two?


[x*x for x in range(5)]
(x*x for x in range(5))

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