本文整理汇总了Python中match.Match.generate_list方法的典型用法代码示例。如果您正苦于以下问题:Python Match.generate_list方法的具体用法?Python Match.generate_list怎么用?Python Match.generate_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类match.Match
的用法示例。
在下文中一共展示了Match.generate_list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: input
# 需要导入模块: from match import Match [as 别名]
# 或者: from match.Match import generate_list [as 别名]
from mentor import Mentor
from student import Student
from match import Match
from tablefootball import TableFootballMatch
from dojo import Dojo
from project import Project
import csv
import random
codecool_bp = CodecoolClass.generate_local()
# for random:
observed_class = codecool_bp
all_students = codecool_bp.students
all_mentors = codecool_bp.mentors
all_matches = Match.generate_list('matches.csv')
table_football_matches = TableFootballMatch.generate_list('tablefootball.csv')
all_dojos = Dojo.generate_list('dojos.csv')
all_projects = Project.generate_list('projects.csv')
days_of_the_week = ('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday')
# One week
for day in days_of_the_week:
# One day
next_line = input("\nIt's " + day + ".\n")
match_of_yesterday = random.choice(all_matches)
was_it_expected = bool(match_of_yesterday.expected_result)
print("Yesterday there was a match: " + match_of_yesterday.match_name)
if match_of_yesterday.important == True: