You are viewing a single comment's thread. Return to all comments →
this could be considered one liner in python,
return 'YES' if sum([1 for i in "abcdefghjkilmnopqrstuvwxyz" if i in s if sum([1 for j in s if i==j])%2==1]) <=1 else 'NO'
can you please explain this as I am new to python and I find your solution way better than mine