Level 9 : What is the output of the following code?


listNumbers = [20, 22, 24, 26, 28, 28, 20, 30, 24]
print(list(set(listNumbers)))

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