menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Python Day...
source image

Dev

1d

read

82

img
dot

Image Credit: Dev

Python Day-27 Tuples, Set : Methods,Examples,Tasks

  • Tuple items are ordered, immutable(unchangeable), and allow duplicate values.
  • Tuples also allows indexing,slicing.Tuples are similar to list and can perform addition,multiplication
  • Tuple packing and unpacking are features that allow you to group values into a tuple and extract them back into individual variables.
  • Same functions can be used as list functions.
  • The next() function returns the next item in an iterator.
  • The '==' is known as the equality operator.
  • Sets are used to store multiple items in a single variable.
  • union(), intersection(), difference() and symmetric_difference() are different set operations.
  • discard() and remove() methods.
  • The tasks performed include set operations such as union, symmetric difference, difference, intersection and printing players played only in one match

Read Full Article

like

4 Likes

For uninterrupted reading, download the app