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 | 1736+ Python FAQs | Share
invalid-list | object-attribute | module | operators | multiple-inheritance | higher-order-function | operations | feature | zfill-function | installation | raise | asyncio-module | assert | data-structure | keyword | python-django | pep | type-conversion | exception | multiprocessing | library | with-statement | input-function | logical-operator | classes | list-method | docstring | global | match | sum() | print | identity-operator | stack | operator-overloading | file-handling | package-management | namespace | control-statement | numpy | string-formatting | else-statement | virtual-environment | oops | python-repl | set-operation | identifier | escape-operator | tuple-unpacking | min-function | string-slicing | descriptors | formal-and-actual-parameter | postfix | shallow-copy | matrix-list-comprehension | head-and-tail | __future__ | complex-number | mathematics | range | numeric | input | inherit | arithmetic-operation | file_handling | round | yield | mysql | constructor | matplotlib | gil | syntax-error | string-iteration | loop | lists | encoding | def | while-else-loop | pickling-&-unpickling | random-function | encapsulation | generator | string-method | regular-expression | destructor | name-mangling | class-and-instance-variable | design-principle | pseudocode | multithreading | command-line-parsing | math-copysign | recurssion | comparison | iterable | sys | debugging | sorting | indentation | python | conversion | counter | conditional-statement | conditional-statement | datatype | built-in | comprehension | precedence-and-associativity | attribute | iterator | function-argument | exponentiation | loops | class | decimal | print-statement | error | matrix | string-formatting | statement | python-history | counter-function | overflow | choice | control-flow | round-function | function | list-mutation | version-check | mathematical-function | dictionaries | zip | mapping-function | call | objects | logical-operation | id-function | decorator | while-and-for-loop | functional-programming | python-module | update | join | static-method | filter | boolean-and-non-boolean | async | string-concatenation | global-variable | list-comprehension | boolean | class-and-inheritance | pandas | software-design | arithmetic-expression | list-indexing | operator | int | __init_subclass__ | typeerror | implementation | string-method | datetime | loop-control | min-max-function | bitwise | staticmethod | turtle | identity-operator | logical-operator | expand-tab | virtual-environment | syntax | goto-function | center | context-manager | data-type | factorial-function | set | __all__-attribute | split | binary | swapping | list-vs-tuple | memory | interpreter | indexing | operand | string-slicing | return-statement | thread | binary-operation | asyncio | generators | data_structure | fabs-function | while-loop | operator-or | inheritance | file-handling | method | regex | parameter | class-and-object | exception-handling | complex | scientific-notation | data-structures | compute | default-mutable-argument | namedtuple | generators-in-python | function-and-scope | exception-handling | array | lambda | global-variable | slice | immutability | deep-copy | string | heap-memory | immutable-data-type | collection | filter-function | string-manipulation | threading | collections | frozenset | integer | operator-and | bitwise-operator | rollback | math | list-join | slicing | syntaxerror | random | comment | list-comprehension | built-in-function | error-handling | control-flow | expression | global-keyword | application | sorted | file | dictionary | condition | input-function | touples | version | assignment-operator | dicts | sys-module | type-conversion | max-min | oop | bitwise-operator | floating-point-precision | polymorphism | recursion | odd-number | access-modifier | append | mutable | zip-function | built-in-function | type_conversion | format | basic | memory-management | list-operation | benefit | list-slicing | nested-loop | enumerate() | map-function | data-structure | lambda-function | copy | lambdas | magic-method | functions | for | list | precedence | variable | data-type | init | python_version | import-method | methods | syntax-error | sum-function | tuple ...