def allcap_differential(words):
 is_different = False
 allcap_words = 0
 for word in words:
  if word.isupper():
   allcap_words += 1
 cap_differential = (len(words) - allcap_words)
 if ((cap_differential > 0) and (cap_differential < len(words))):
  is_different = True
 return is_different

def allcap_differential ( words ) : is_different = False allcap_words = 0 for word in words : if word . isupper ( ) : allcap_words += 1 cap_differential = ( len ( words ) - allcap_words ) if ( ( cap_differential > 0 ) and ( cap_differential < len ( words ) ) ) : is_different = True return is_different
check whether just some words in the input are all caps .