Two Out Of Three Leetcode Python Easy