python - How to retrieve values of list in browser using web2py? -
I am writing a TSP algorithm using a python and there is a list of output node path such as: path [1,2] , 3,4,5] where each number is the key to the city name. Now I need to recover the entire list in the browser, but I can not because I only get a value from the list when I use the return path I do: By seeing the output in the console window, my code Running like Uri Any ideas ??
Simple example:
file.py def temp (): path = [1,2,3,4,5] return path File.html { {Extension 'layout.html'}} & lt; H1 & gt; {{= path}} & lt; / H1>
You should do this:
< Code> path = [1,2,3,4,5] return str (path)
Comments
Post a Comment