I'm trying to split a dict from a certain point in the dict. It seemed like doing a simple items_dict[3:]
would work but it did not work.
items_dict = {
"Cannon barrels":10,
"Cannon furnace":12,
"Candle":36,
"Bronze arrowheads":39,
"Iron arrowheads":40,
"Steel arrowheads":41,
"Mithril arrowheads":42,
"Adamant arrowheads":4
}
print items_dict[3:] # Nope, this won't work
print items_dict["Candle"] # This will of course, but only returns the Candle's number
I only figured out how to slice a dictionary by keys that start with a certain string, but I just want to know how to slice a dictionary similar to a list.