どの行が同じ長さでないかを調べる必要がありますが、最も一般的な単語とは異なるすべての行は、確かに同じ長さ。ここに私のコードです。リスト内に珍しい長さを見つける
import collections
fle= ['hello', 'hello', 'hello','justi', 'hello','no', 'hello', 'no']
count= sum(1 for n in fle)
print count
most_common_length = collections.Counter(fle).most_common(1)[0][0]
print most_common_length
mcl = len(most_common_length)
uncommon = [n for n, v in enumerate(fle) if v != most_common_length]
print uncommon
を使用することができ、今は言葉が同じものはありませんが、私はこれを行う際に、いくつかは、まだ、5つの文字の同じ長さを持っていることはありませんがあることを言います最も一般的な長さ –
もし動作すれば、ここでのstackoverflowの標準的な手順は答えを受け入れることです。 – e4c5