From: Marcelo Date: 2006-07-13T06:20:11+09:00 Subject: Re: Why Ruby over Python? I don't know what you mean "simply". Here goes the code: a = [] a += [1, 2, 3] # if you would append the list instead of three numbers, # it would be a.append([1, 2, 3]) a.append({"me": "i think", "you": "you think"}) for i in a: print i That's all. Marcelo bitdoger2@yahoo.com wrote: > newbie asks: is it true that python does NOT support containers simply > like ruby does? > ie. > a=[]<< an array container > a<<[0,1,2] > a<<{"me"=>"i think","you"=>"you think"} > and then use .each iterater to process this container.... > howachen@gmail.com wrote: > > Besides ROR, can you give me a reason why perfer ruby instead of > > python? > > > > seems to many users, they are very similar in nature... > > > > such as > > > > 1. non C or Java style syntax > > 2. focus on codes readability, not like Perl > > 3. ..