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