Skip to content

Instantly share code, notes, and snippets.

@max-giro
Created November 25, 2012 01:40
Show Gist options
  • Save max-giro/4142048 to your computer and use it in GitHub Desktop.
Save max-giro/4142048 to your computer and use it in GitHub Desktop.
L12 PROBLEM 3
def loadTemperatures(file):
lines = [line.strip() for line in open(file) if line[0].isdigit()]
data = []
[data.insert(int(line.split()[0]), int(line.split()[1])) for line in lines]
return data
temps = loadTemperatures("julyTemps.txt")
producePlot(temps)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment