30秒学会 Python 片段 – cast_list
Casts the provided value as a list if it’s not one. Use isinstance() to check if the given val...
Casts the provided value as a list if it’s not one. Use isinstance() to check if the given val...
Returns the symmetric difference between two iterables, without filtering out duplicate values. Crea...
Returns the transpose of a two-dimensional list. Use *lst to get the passed list as tuples. Use zip(...
Returns the difference between two collections, after applying the provided function to each element...
Returns the maximum of a collection, after mapping each element to a value using the provided functi...
Returns a list of elements that exist in both lists, after applying the provided function to each el...
Returns the maximum value of a list, after mapping each element to a number using the provided funct...
Removes elements from the start of a list until the passed function returns true and returns the rem...
Filters out the non-unique values in a list. Use Iterable.where() in combination with List.indexOf()...
Returns the difference between two lists, after applying the provided function to each list element ...