thelist = [ 'blue' , 'red' , 'blue' , 'yellow' , 'blue' , 'red' ]. c = Counter(thelist). print (c). Output. Counter({'blue': 3, 'red': 2, 'yellow': 1}).
確定! 回上一頁