python check if string contains characters not in list