problem with lists

Peter Posselt Vestergaard posselt at daimi.au.dk
Tue Jul 6 11:28:49 EDT 1999


It seems like I've completely misunderstood something or at least done
something wrong. There's noway I can see why these two scripts are
outputting nothing or more correctly only the 4 first lines which cannot
be seen in a browser. Anybody knows why?
----script 1------------------------------------------------

#!/usr/local/bin/python
import cgi

print "Content-type: text/html"
print

print "<HTML><HEAD>"
print "<TITLE> Ændring af data </TITLE>"
print '</HEAD><BODY BGCOLOR="#FFFFFF"><FONT FACE="Helvetica">'

nydata.insert(0,'hej')
print nydata[0]
print 'strange'

print '</BODY></HTML>'

---------------------------------------------------------------

----script 2---------------------------------------------------

#!/usr/local/bin/python
import cgi

print "Content-type: text/html"
print

print "<HTML><HEAD>"
print "<TITLE> Ændring af data </TITLE>"
print '</HEAD><BODY BGCOLOR="#FFFFFF"><FONT FACE="Helvetica">'

nydata[0]='weird'
print nydata[0]
print 'strange'

print '</BODY></HTML>'

------------------------------------------------------------------
This can be found at
http://dovs-www.daimi.au.dk/cgi-posselt/kurtilmelding/test.py


best regards
Peter Posselt Vestergaard




More information about the Python-list mailing list