person.py 文件源码

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

项目:eurovision-country-selector 作者: mikejarrett 项目源码 文件源码
def build_list_of_people_from_csv(filename, countries):
    people = []
    with open(filename, 'r') as opened_file:
        reader = csv.reader(opened_file)
        for row in reader:
            excluded_countries = []
            if len(row) > 1:
                excluded_countries = [
                    sanitize_string(name)
                    for name in row[1].split(',')
                ]
            people.append(
                Person(
                    name=row[0],
                    countries=countries,
                    excluded_countries=excluded_countries
                )
            )

    return people
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号