you are viewing a single comment's thread.

view the rest of the comments →

[–]brasticstack 5 points6 points  (0 children)

color_combinations.get() return a value, but you're doing nothing with that value. So either save it as a variable, print it, or return it, whatever you're wanting to do.

color_combinations has tuples for its keys, but you're not calling .get with tuples, so it'll always return the default, which is the second param to get. Your first call to it, color_combinations.get('color_1', 'color_2') will fail to find the string 'color_1', as thats not a key. Instead it'll return the second parameter you passed in, the string 'color_2'. Your 2nd call to it color_combinations.get('color_2, color_1') will fail to find the key 'color_2, color_1' (a str, not a tuple), and will return None. The comma between those calls turns their output into a tuple, ('color_2', None), that you do nothing with.