[Tutor] finding common words using set

seraph seraph776 at gmail.com
Sun Jan 1 15:51:53 EST 2023


When I ran your code, it returned *banana. *You mentioned it should
return "*banana
and orange*." However, based on the example that you provided, it should
only return *banana*.

strings = ['apple orange banana', 'orange banana grape', 'banana mango']
>

The common word in these 3 groups is *banana *- not *banana & orange*.

I hope this helps!

Seraph


More information about the Tutor mailing list