From: sto.mar@... Date: 2013-07-10T06:45:11+09:00 Subject: Re: create variables depending on counter Am 09.07.2013 20:55, schrieb stefan heinrich: > Yes as you mentioned it should look like > > ['Dog', 'Dog'] and > ['Car, Car, Car]. > > If it doesn't make sense for you i have to explain more. > > I have a gui with a tablewidget. > Dog and Car are only row Headlines. > > Values > Dog | 12 > Car | 14 > Car | 67 > Dog | 98 > Dog | 32 [...] > Depending on how many Variables I have my programme > should create new Array with only the values with the same headline. > Like this: > > Arraydog = 12, 98, 32 > Arraycar = 14, 67 You should use a hash with the headers as keys. My examples can very easily be adapted to do exactly what you need. Regards, Marcus --