list to string

Batista, Facundo FBatista at uniFON.com.ar
Thu Sep 11 18:17:59 EDT 2003


#- main (args):
#-         fhand=open(args[1:],"r+")

This is because args[1:] returns a list, and you need a string. See:

>>> mylist = ["first", "myfile.txt", "third"]
>>> mylist[1:]
['myfile.txt', 'third']
>>> mylist[2]
'third'
>>> 

.	Facundo





More information about the Python-list mailing list