import tkinter as tk

window = tk.Tk()
---------------------------------------------------------------------------
TclError                                  Traceback (most recent call last)
/home/syeung2/vscode/xc22/_notebooks/2022-10-11-team_score.ipynb Cell 1 in <cell line: 3>()
      <a href='vscode-notebook-cell://wsl%2Bubuntu/home/syeung2/vscode/xc22/_notebooks/2022-10-11-team_score.ipynb#W1sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0'>1</a> import tkinter as tk
----> <a href='vscode-notebook-cell://wsl%2Bubuntu/home/syeung2/vscode/xc22/_notebooks/2022-10-11-team_score.ipynb#W1sdnNjb2RlLXJlbW90ZQ%3D%3D?line=2'>3</a> window = tk.Tk()

File ~/anaconda3/lib/python3.9/tkinter/__init__.py:2270, in Tk.__init__(self, screenName, baseName, className, useTk, sync, use)
   2268         baseName = baseName + ext
   2269 interactive = False
-> 2270 self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
   2271 if useTk:
   2272     self._loadtk()

TclError: no display name and no $DISPLAY environment variable
def get_meet_scores():
    teamList = {}
    team = ""
    count = 1
    scores = []
    exists = 0
    final = []

    while team != "done":
        team = input()
        if team != "done":
            if len(teamList.keys()) == 0:
                scores.append(count)
                count += 1
                teamList.update({team:scores}) 
            else:
                for key in teamList.keys(): 
                    if team == key:
                        exists = 1
                        scores = teamList[team]
                        if len(scores) < 7:
                            scores.append(count)
                            count += 1
                if exists == 0:
                    scores = []
                    scores.append(count)
                    count += 1 
                exists = 0           
                teamList.update({team:scores}) 

    for k,v in teamList.items():
        print(v)
        if len(v) > 4:
            score = v[0] + v[1] + v[2] + v[3] + v[4]
            final.append((k, score))
    
    print(final)

get_meet_scores()
[1, 7, 8, 9, 10]
[2, 3, 4, 5, 6]
[('a', 35), ('b', 20)]