Python Programming Language: Tuple Functions

Hi everyone, welcome back. Tuples are a data structure in the Python language capable of storing several items in a singular tuple variable. Tuples are a build in data type in Python and we will go over functions regarding tuples. For a more in depth tutorial on Tuples in Python, click here.

Tuple Methods

  • count(): returns the number of how many times a given item appears in the tuple
  • index(): returns the index number of where a given item is found within the tuple

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store