Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Python: Count occurrences in list/tuple

📅 2009-Sep-28 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

inList = [1, 2, 3, 3, 4, 5]
inList.count(3) # Count occurrences of 3 in list