Level 1 : What is the output of the following code?


x ={1,3,8}
y = {8,18,2}
z= x.intersection(y)
print(z)

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