Re: Extract items from string in db

2017-03-15 Thread Tobiah
On 03/14/2017 03:26 PM, DFS wrote: > I have a SQLite database with TEXT columns containing strings of the format: > > ['Item1: Value1 has,comma','Item2: has'apostrophe','Item3: Value3'] > > The brackets are part of the string. > > How can I unpack and access each item? > Item1: Value1 has,comma

Re: Extract items from string in db

2017-03-15 Thread Steve D'Aprano
On Wed, 15 Mar 2017 09:26 am, DFS wrote: > I have a SQLite database with TEXT columns containing strings of the > format: > > ['Item1: Value1 has,comma','Item2: has'apostrophe','Item3: Value3'] > > The brackets are part of the string. So in Python format, you have something like this: s = "['I