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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -