loader

For this tutorial in video form, click here

Let’s now talk about loops. When we have a list in Deluge, we might want to do something with that list.

Example List

Here is an example list, but your list could be anything: a list of products, names, or anything related to your business. We can use a “for” statement (shown below) to inspect the items from our list:

In the above example, we’re using info statements to output the data from some_list.

Here is another example, where we pull leads from our CRM and calculate the total amount we think we’ll get from those leads:

Conclusion

For loops are an invaluable tool when you’re dealing with data. Any time you get data from an external API, then you often need to perform actions on each of the items in the dataset. That’s when for loops come in handy.

For this tutorial in video form, click here