On Dec 17, 6:05 am, Sallu wrote:
> Hi i tried with thunderfoot code
>
> error:
>
> Traceback (most recent call last):
> File "", line 8, in ?
> ValueError: need more than 1 value to unpack- Hide quoted text -
>
hence, my 'seemingly' functional qualification. :)
that's most likely to due to a d
On Dec 17, 4:23 am, "thunderf...@gmail.com"
wrote:
> not as slick as Emile's (didn't think about using strip() ), but
> seemingly functional:
>
> data = ['key1: data1','key2: data2','key3: data3',' key4: ','
> \tdata4.1',' \tdata4.2',' \tdata4.3','key5: data5']
> result = {}
>
> for item in data:
not as slick as Emile's (didn't think about using strip() ), but
seemingly functional:
data = ['key1: data1','key2: data2','key3: data3',' key4: ','
\tdata4.1',' \tdata4.2',' \tdata4.3','key5: data5']
result = {}
for item in data:
if item.endswith(': '):
currkey = item[:-2]
r
J wrote:
Hi all,
I need some help in turning a list into a dictionary...
The list looks something like this:
['key1: data1','key2: data2','key3: data3',' key4: ',' \tdata4.1','
\tdata4.2',' \tdata4.3','key5: data5']
and it's derived from output (via subprocess.Popen) that in a terminal
would
On 12/16/2009 1:32 PM J said...
Hi all,
I need some help in turning a list into a dictionary...
The list looks something like this:
['key1: data1','key2: data2','key3: data3',' key4: ',' \tdata4.1','
\tdata4.2',' \tdata4.3','key5: data5']
and it's derived from output (via subprocess.Popen) th
Hi all,
I need some help in turning a list into a dictionary...
The list looks something like this:
['key1: data1','key2: data2','key3: data3',' key4: ',' \tdata4.1','
\tdata4.2',' \tdata4.3','key5: data5']
and it's derived from output (via subprocess.Popen) that in a terminal
would look like t