util.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:pyemtmad 作者: rmed 项目源码 文件源码
def ints_to_string(ints):
    """Convert a list of integers to a *|* separated string.

    Args:
        ints (list[int]|int): List of integer items to convert or single
            integer to convert.

    Returns:
        str: Formatted string
    """
    if not isinstance(ints, list):
        return six.u(str(ints))

    return '|'.join(six.u(str(l)) for l in ints)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号