I did have parenthesis around setq in my test program. I just forgot to add it when I typed the post. Like I said, the code I wrote didn't give me the result that I want. I am trying to learn lisp and I used setq here because later I want to try to read data from a file and assign the data to various variable to create a list. Unfortunately I even failed this simple step. The list I got was like (a: 3.4) (b: 4.2) (mystring: test) (a: 7.8) (b: 8.9) (mystring: hello) (one element in the list?)instead of two elements in the list which is what I want.

There are also built-in functions for lists of key/value pairs (known as association lists, a-list) and for lists that alternate as "(key1 value1 key2 value2 ...)" (known as property lists, p-list). For example, ARGLIST above may be rewritten to return an alist as