Need Help with Python/C API
Paul Watson
pwatson at redlinepy.com
Thu Jan 19 16:04:11 EST 2006
pycraze wrote:
> Hi guys,
>
> I Need to know how do i create a dictionary... eg:
> n = pali_hash
> n={}
> n={1:{ } } -> i need to know how to make a key of a dictionary, to a
> dictionary using Python/C API's
It looks like you are asking how to create a dictionary (hash). If it
is more than that, then please add some information.
$ python
Python 2.4.1 (#1, Jul 19 2005, 14:16:43)
[GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> n = {}
>>> n[3] = 'abc'
>>> n['x'] = 7
>>> n
{'x': 7, 3: 'abc'}
More information about the Python-list
mailing list