On 7/22/10, ANKUR AGGARWAL <coolankur2...@gmail.com> wrote:
> hey i have just started making  a app using python and just gt a problem..
>
> i have two list
> a=["x","z"]
> b=[1,2]
>
> i want to make a directory like this
It is called a dictionary, actually.
> c={"x":1,"z":2}
>
> is it possible???? i mean i tried it using loops and all but i cant append a
> directory so i m unable to do this...
> plz tell me if there's any way to get the directory like this.... Thanks in
> advance :):)
idx=0
for i in a:
    c[i]=b[idx]
    idx+=1
>


-- 
Have a great day,
Alex (msg sent from GMail website)
mehg...@gmail.com; http://www.facebook.com/mehgcap
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to