I have a line of code that creates a dictionary by setting its key as that of the key of dictionary_b. It then uses the value of that key in dictionary_b as the key to look through dictionary_a to grab the corresponding value.
new_dictionary = {key : dictionary_a.get(value, value) for key, value in dictionary_b.iteritems()}
This compiles fine on Windows however when I try to use compile on Linux I get the following error:
File "IP_Merger.py", line 46
new_ip = {key : dictionary_a.get(value, value) for key, value in dictionary_b.iteritems()}
^
SyntaxError: invalid syntax
On Windows I am compiling on Python 2.7 and on Linux 2.6.6. Could that be the issue?