#validation
Answer a yes/no question about a value.
- has_duplicates(items)Return True as soon as any value repeats, even in a huge or endless iterable.
- have_same_contents(a, b)Compare two collections regardless of order, counting duplicates, in linear time.
- is_anagram(a, b)Compare letter counts, ignoring case, spaces and punctuation.
- is_palindrome(text)Check whether text reads the same reversed, ignoring case, spaces and punctuation.
- clamp_number(value, low, high)Limit a value to an inclusive range, accepting the bounds in either order.
- is_prime(n)Test primality by trial division up to the integer square root.
- is_weekday(day) +1Tell weekdays from weekends using date.weekday().