From: Dave Bass Date: 2008-05-27T20:23:50+09:00 Subject: Re: ruby lookups(=python dict)? unknown wrote: > what is the easiest way for a dict like in python? > > are there hash tables? The easiest solution is to use a hash, which is built into the language. This is assuming the order in which the entries are stored within the hash is unimportant. In very many cases this is true. dict = {} dict["aardvark"] = "a" dict["badger"] = "b" p dict You don't have to use strings for keys and values; you can use just about anything you want. -- Posted via http://www.ruby-forum.com/.