def solution(A): return min(A.count(1), A.count(0)) ans = solution([1, 0, 0, 1, 0, 0])print(ans)
Standard input is empty
2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!