Python3 Att List Count
# Python3.x Python3 List count() Method
[ Python3 Lists](#)
* * *
## Description
The count() method is used to count the number of times a specific element appears in a list.
## Syntax
The syntax for the count() method is:
list.count(obj)
## Parameters
* obj -- The object to be counted in the list.
## Return Value
Returns the number of times the element appears in the list.
## Example
The following example demonstrates the usage of the count() function:
## Example
#!/usr/bin/python3
aList =[123,'Google','Tutorial','Taobao',123];
print("123 element count : ", aList.count(123))
print("Tutorial element count : ", aList.count('Tutorial'))
The output of the above example is as follows:
123 element count : 2Tutorial element count : 1
[ Python3 Lists](#)
YouTip