Please help for Python programming

bruno modulix onurb at xiludom.gro
Wed Mar 23 04:37:41 EST 2005


yy0127 at gmail.com wrote:
> Thanks for your advice.^^

It would be more useful to follow them than to thank me.

> I find out something special (because i don't know). I would like to
> retrieve data from source file into array. The data will be omited if
> the value is duplicated. For example, there is 3 values - 1,2,1. It
> will only display 1,2 after i ran the script.
> 
> value = (1,2,1)
> while 1:
>         users = {}
>         byteDict = {}
>         byteDict = users[value]
>         users[value] = byteDict
>         print users
> 
> I think the above code cannot run properly. 

Don't think. Be sure. Verify. Try to find out why it cannot run at 
all[1]. Fix this problem first. *Then* we'll happily read your next 
posts and try to help you fix the other problems if there are...

[1] It's pretty obvious for anyone having read any python beginner 
tutorial, I already explained you why, and gave you a working example.

If you don't read answers, don't post questions :-/

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for 
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list