cara menghitung sesuatu dalam daftar ular python

list.count(element)

list1 = ['red', 'green', 'blue', 'orange', 'green', 'gray', 'green']
color_count = list1.count('green')
print('The count of color: green is ', color_count)
Surfaceterror