Python

Python Menu

Python

Python Tuple count() - Definition, Syntax, Parameters, Examples

Definition

The count() method returns the number of times a specified value appears in the tuple.

Syntax

tuple.count(value)

Parameters

Parameter Description
value Required. The item to search for.

Examples:

myNumbers = (1, 89, 27, 81, 27, 55, 47, 62, 84, 50) x = myNumbers.count(27) print(x)

Introduction

Python Basics

Python Advance

Data Science Python Tutorials

Python Functions and Methods