How could i get below code working? I want to assign value to variable Reputation Risk_22may_only
. I got the below code from here. But it doesn't work for me
risk_type="Reputation Risk"
xxx1=risk_type + "_22may_only"
exec(xxx1 + " = 'something else'")
exec(xxx1 + " = 'something else'")
Traceback (most recent call last):
File "C:\IPython\core\interactiveshell.py", line 2862, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-38-c9a2a2cf48c3>", line 1, in <module>
exec(xxx1 + " = 'something else'")
File "<string>", line 1
Reputation Risk_22may_only = 'something else'
^
SyntaxError: invalid syntax