当前位置: 首页>>代码示例>>Python>>正文


Python Team.addGame方法代码示例

本文整理汇总了Python中team.Team.addGame方法的典型用法代码示例。如果您正苦于以下问题:Python Team.addGame方法的具体用法?Python Team.addGame怎么用?Python Team.addGame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在team.Team的用法示例。


在下文中一共展示了Team.addGame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: len

# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import addGame [as 别名]
for line in f:
    gam = line.split("\t")
    if curseason is not gam[0]:
        if len(seas.keys()) > 0:
            seasons.append(deepcopy(seas))
        seas.clear()
        curseason = gam[0]
    if gam[2] in seas:
        team1 = seas[gam[2]]
    else:
        team1 = Team(names[gam[2]])
    if gam[4] in seas:
        team2 = seas[gam[4]]
    else:
        team2 = Team(names[gam[4]])
    team1.addGame(Game(gam[4], gam[3], gam[5]))
    team2.addGame(Game(gam[2], gam[5], gam[3]))
    seas[gam[2]] = deepcopy(team1)
    seas[gam[4]] = deepcopy(team2)
seasons.append(deepcopy(seas))
# seas.clear()

for i in range(2, len(seasons)):
    seaso = seasons[i]
    q = open(str(1996 + i) + "se.txt", "r")
    teamStats = dict()
    for lines in q:
        stat = lines.split("\t")
        teamStats[stat[1]] = lines
    for team in seaso.keys():
        if team not in teamStats:
开发者ID:paoloruiz,项目名称:basketball,代码行数:33,代码来源:ranks.py


注:本文中的team.Team.addGame方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。