擅长:python、mysql、java
<p>这可以通过循环两次团队列表和检查对手是否“在”原始团队之前来实现。
代码也不依赖于外部库。在</p>
<pre><code>teamlist = ["arsenal", "aston-villa", "bournemouth", "chelsea", "crystal-palace", "everton","leicester-city", "liverpool", "manchester-city", "manchester-united", "newcastle-united", "norwich-city", "southampton","stoke-city", "swansea-city", "tottenham-hotspur", "watford", "west-bromich-albion","west-ham-united" ]
for team in teamlist:
for opponent in teamlist:
if team < opponent:
print(team + "-vs-" + opponent)
</code></pre>