RosettaCodeData/Task/Hash-from-two-arrays/LiveCode/hash-from-two-arrays.livecode
2016-12-05 23:44:36 +01:00

12 lines
269 B
Text

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