Posts

Showing posts with the label artificialintelligence machinelearning python tuple fucntion

Uses Of Tuple Functions In Python

Image
  Tuples are used to store multiple particulars in a single variable. Tuple is one of 4 erected-in data types in Python used to store collections of data, the other 3 are List, Set, and Dictionary, all with different rates and operation. A tuple is a collection which is ordered and incommutable. Tuples are written with round classes. Example: thistuple = (“apple”, “banana”, “cherry”) (print this tuple) Tuple Particulars Tuple particulars are ordered, incommutable, and allow indistinguishable values. Tuple particulars are listed, the first item has indicator (0), the alternate item has indicator (1) etc. Ordere d When we say that tuples are arranged, it means that the particulars have a outlined order, and that order won’t modify. Incommutable Tuples are incommutable, meaning that we can not change, add or remove particulars after the tuple has been created. Allow Duplicates Since tuples are indexed, they can have items with the same value: example: this tuple = (“apple”, “banana”, “che