I need to take two strings, compare them, and print the difference between them.
So say I have:
teamOne = \"Billy, Frankie, Stevie, John\" teamTwo = \"Bi
easy solution:
def compare(a, b) diff = a.split(', ') - b.split(', ') if diff === [] // a and b are the same true else diff end end
of course this only works if your strings contain comma-separated values, but this can be adjusted to your situation.