ZhangZhihui's Blog |
|
||
2022年1月24日
摘要:
def get_list_span(l: list): """ For list ['a', 'a', 'a', 'b', 'c', 'c', 'd', 'd', 'd', 'd'], its span list is [3, 0, 0, 1, 2, 0, 4, 0, 0, 0] . :param 阅读全文
摘要:
def get_dict_leaves_count(dic): """ If value of a key is a list, count all items in the list as leaves. :param dic: :return: """ if len(dic) == 0: ret 阅读全文
|
Copyright © 2024 ZhangZhihuiAAA
Powered by .NET 9.0 on Kubernetes |