<s> import re <EOL> def str2dict ( strdict ) : <EOL> """<STR_LIT>""" <EOL> if not strdict : <EOL> return { } <EOL> return dict ( [ kv . split ( '<STR_LIT:=>' , <NUM_LIT:1> ) if '<STR_LIT:=>' in kv else [ kv , "<STR_LIT>" ] <EOL> for kv in strdict . split ( '<STR_LIT:U+002C>' ) ] ) <EOL> def str2list ( strlist ) : <EOL> """<STR_LIT>""" <EOL> if strlist is not None : <EOL> strlist = strlist . strip ( '<STR_LIT:U+002CU+0020>' ) <EOL> if not strlist : <EOL> return [ ] <EOL> return re . split ( "<STR_LIT>" , strlist ) </s>
