Python 2.7 では、次の文字列があります。
"((1, u'Central Plant 1', u'http://egauge.com/'),
(2, u'Central Plant 2', u'http://egauge2.com/'))"
この文字列をタプルに戻すにはどうすればよいですか? 何度か使用しようとしましsplit
たが、非常に面倒で、代わりにリストを作成します。
望ましい出力:
((1, 'Central Plant 1', 'http://egauge.com/'),
(2, 'Central Plant 2', 'http://egauge2.com/'))
事前に助けてくれてありがとう!