New to python

Fernando Pérez fperez528 at yahoo.com
Mon Feb 18 16:54:30 CET 2002


Avi Homes wrote:

> Having problems with dictionaries..
> 
> I have one setup i.e.
> 
> ---
> Items{ 'IName': "empty", 'IDesc': "empty", 'IPrice': "empty"}
> temp=raw_input("Whats the name?")
> Items('IName')=temp

Items['Iname'] = temp

Dict/list/tuple elements in Python are accessed with [], not (). Use () only 
for function calls.

Welcome!

f.



More information about the Python-list mailing list