Skip to content

Instantly share code, notes, and snippets.

@Nipun2016
Created February 24, 2018 11:16
Show Gist options
  • Save Nipun2016/a83a3e31cfce34b433ad07e414b8db6f to your computer and use it in GitHub Desktop.
Save Nipun2016/a83a3e31cfce34b433ad07e414b8db6f to your computer and use it in GitHub Desktop.
from collections import namedtuple
TimeSlot = namedtuple('TimeSlot', 'hour price')
t0 = TimeSlot(0, 20)
t1 = TimeSlot(1, 20)
# ....
t10 = TimeSlot(10, 50)
# ....
t18 = TimeSlot(18, 50)
# ....
t23 = TimeSlot(23, 20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment