>>> names = ['King', 'Queen', 'Joker'] >>> any(n in 'King and john' for n in names) True >>> all(n in 'King and Queen' for n in names) False