Answer the question
In order to leave comments, you need to log in
How to output variables from a loop?
There is this code:
for objItem in colItems:
if objItem.Caption != None:
print("Caption:" + objItem.Caption)
print("Command:" + objItem.Command)
print("User:" + objItem.User)
return self.wfile.write('<p>{}<p>'.format(objItem.Caption).encode('utf-8')) # вывод на веб странице
Answer the question
In order to leave comments, you need to log in
captions = []
for objItem in colItems:
if objItem.Caption != None:
print("Caption:" + objItem.Caption)
print("Command:" + objItem.Command)
print("User:" + objItem.User)
captions.append('<p>{}<p>'.format(objItem.Caption))
captions = '\n'.join(captions)
return self.wfile.write(captions.encode('utf-8'))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question