15
el Barto
Last seen 2 years ago
Member for 3 years, 4 months, 9 days
Difficulty Normal
I don't get it. Why does this expression
6 < len(password) != len([x for x in password if x.isdigit()]) > 0
evaluate to False for passwords 'sh5' and 'abc1'?
6 < len('sh5') # False
len([x for x in 'sh5' if x.isdigit()]) > 0 # True
False != True # True
More
Did you use sorted() to sort this set of words intentionally? I think you could assign a list to text_words at once.
text_words = [w for w in text.split() if w in words]
More