I am having a use case where I need to pass a value which is having semi colons and colons for a key in a python dictionary. But it gives me a syntax error. Seems like this does not happen if the value is enclosed in double quotes instead of conventional single quote. Is there a way to impose that? Or, some other work around?
Here is the error -
props = {'creds1':'UserListings;service;SomeValue;Username:Mohan;Password:passkey123','creds2':''UserListings2;service;SomeValue2;Sample:Sikander;Password:passkey123'}
File "", line 1 monProps = {'creds1':'UserListings;service;SomeValue;Username:Mohan;Password:passkey123','creds2':''UserListings2;service;SomeValue2;Sample:Sikander;Password:passkey123'} ^ SyntaxError: invalid syntax
Thanks in advance!