RosettaCodeData/Task/Hash-from-two-arrays/LiveCode/hash-from-two-arrays.livecode

13 lines
269 B
Plaintext

put "a,b,c" into list1
put 10,20,30 into list2
split list1 using comma
split list2 using comma
repeat with i=1 to the number of elements of list1
put list2[i] into list3[list1[i]]
end repeat
combine list3 using comma and colon
put list3
-- ouput
-- a:10,b:20,c:30