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