[Tutor] Stupid newbie question

James A Roush jar@mminternet.com
Sat, 24 Feb 2001 17:24:17 -0800


I have a piece of code, listed below, it runs fine except for the line I
commented out.  The code reads a sequential text file, with two fields per
record, delimited by a tab.  The two fields are placed in a dictionary.  The
problem starts when I try to convert one field to uppercase.  Any ideas?

BTW, I'm new to Python but not programming in general.

site_list = {}
SITELIST = open(sitelist_file, 'r')
for line in SITELIST.readlines():
    web_site = line.split('\t')
    print web_site[0],web_site[1]
#    site_list[web_site[0].upper] = web_site[1]
SITELIST.close