fork download
  1. def solution(A):
  2. return min(A.count(1), A.count(0))
  3.  
  4.  
  5. ans = solution([1, 0, 0, 1, 0, 0])
  6. print(ans)
Success #stdin #stdout 0.03s 118656KB
stdin
Standard input is empty
stdout
2