30秒学会 Python 片段 – is_anagram
Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation an...
Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation an...
Returns all the elements of a list except the last one. Use lst[0:-1] to return all but the last ele...
title: curry tags: function,intermediate Curries a function. Use functools.partial() to return a new...
Converts a string to kebab case. Break the string into words and combine them adding – as a separato...
title: find tags: list,beginner Returns the value of the first element in the provided list that sat...
title: check_prop tags: function,intermediate Given a predicate function, fn, and a prop string, thi...
title: is_contained_in tags: list,intermediate Returns True if the elements of the first list are co...
Calculates the factorial of a number. Use recursion. If num is less than or equal to 1, return 1. Ot...
Returns the symmetric difference between two lists, after applying the provided function to each lis...
Returns True if the provided function returns True for every element in the list, False otherwise. U...