All the same, Python is dynamic and expressive. This is not taken away from him.
there are some.
here is your single-bedroom:
Result = LIST ( set (ANS) & amp; set (Word))
This will be intersected DATA-HIGHLIGHTED = ""> [, ' 'White' ] if you need a list of unique elements in the combination of two lists:
[ '' "red ', ' 'White' , 'green' , 'Blue' ] result = list ( set (ANS + Word))
[ 'green' , '"" "blue' ] result = list ( set (Ans) ^ set (Word)) r Pre> the usual difference (many from aus not included in Word ):
[ '' green ', 'Blue' ] result = line ( set (ANS) - set (word)) option that preserves a smaller number of types of types:
set (word) result = [x for x in ans if x in in sbuf)] Pre>