import sys
print(sys.argv[1])
--ip=127.0.0.1
print(10)
10
teams = {"ATL":"Atlanta Braves", "CHC": "Chicago Cubs", ...}
team_name = teams["ATL"]
teams = [("ATL","Atlanta Braves"),("CHC","Chicago Cubs"),...]
def read_teams_data(fname):
with open(fname, "r") as f:
data = f.read().splitlines()
f.close()
return data
read_teams_data("data/teams.dat")
['Atlanta Braves:ATL', 'St. Louis Cardinals:STL', 'Chicago Cubs:CHC', 'Arizona Diamondbacks:ARI', 'Cleveland Indians:CLE']