modify python string list dict