Hellos,
I was wondering if there is any built-in function that clears the
array. I was also wondering if this works:
arrMoo = ['33', '342', '342']
arrMoo = []
--
http://mail.python.org/mailman/listinfo/python-list
Hellos,
I know that if you have:
happy = r"C:\moo"
print happy
you get C:\moo instead of C:\\moo
The thing is that I want to do this a variable instead.
ex. testline = fileName.readline()
rawtestline = r testline
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
You're right, but the moment I append it onto a list, it would become
C:\\moo.
arrPlaces = []
intPoint =0
while (len(testline)):
testline = fileName.readline()
print testline
arrPlaces[intPoint].append(testline)
intPoint += 1
print arrPlaces
> C:\moo
> C:\supermo
However, when I send the list over as a dictionary for HTML:
d["places"] = arrPlaces
return render_to_response('rentSearch.html', d)
the HTML using Django has:
{{ places }} but returns ['C:\\moo', 'C:\\supermoo']
--
http://mail.python.org/mailman/listinfo/python-list