web2py is written in Python.

In http://www.python.org/dev/peps/pep-0008/ 

For sequences, (strings, lists, tuples), use the fact that empty sequences 
> are false.


So in your case:

if not result:

  print "No stops"


Il giorno mercoledì 24 ottobre 2012 22:33:03 UTC+2, Hector Magnanao ha 
scritto:
>
> Hi, 
>
> How do you check if a list is empty in web2py ? Basically I need to check 
> this logic:
>
>     result = tm.get_stops(lat, lon);
>
> I want to see if result is empty or not.
>
> Thanks,
>

-- 



Reply via email to