Level 1 : what is the output of the following list function?


numbers=[2,3,4,5,6,7,8,9,0]
print(sum([x**2 for x in numbers]))

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