Check out example codes for "python list from sql". It will help you in understanding the concepts better.

Code Example 1

[item for t in self.sqlhlpr.select("SELECT DISTINCT item FROM table") for item in t]

Learn ReactJs, React Native from akashmittal.com