So I have problems with this code.
if s.get("home") < s.get("away"): scoringplays = scoringplays + s.get("away") + "-" + s.get("home") + " " + game.get("away_team_name") elif s.get("home") > s.get("away"): scoringplays = scoringplays + s.get("home") + "-" + s.get("away") + " " + game.get("home_team_name") else: scoringplays = scoringplays + s.get("home") + "-" + s.get("away") + " Tied"
He pulls the score from the baseball game from MLB and sends it to reddit as follows:
4-3 Name of the winning team
However, I noticed that if one of the indicators has double digits, the code seems to only read the first digit, so a score of 10-2 would look like this:
2-10 Loss of team name
I searched a bit, and maybe I'm using the wrong search terms, but I can not find the answer here. Any help would be greatly appreciated.
source share