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