Level 10 : The Output of the following code?


set1 = {10,20,40}
set2 = {40,50,60}
print(set1.union(set2))

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