How do I do this (text manipulation) in python

Soldato
Joined
12 May 2004
Posts
7,018
Location
England
I have a file that i need to add " marks to the list declaration as its throwing an error and I am loathed to type it in again. I foolishly typed this out and forgot to have the list elements as strings so i need to add the " around each item in the list.


Hope that makes sense.

for example.

MyDictionary = {'item1':[a1,b1,c1,d1,e1,f1], item2:[b1,c1,d1,e1,f1]}
 
Back
Top Bottom