Now that we have the function defined, we can call it. If you try to use a function before it is defined, Python will throw a NameError. While in C programming one declares the function ahead of time and define it later (commonly called 'prototyping'), Python requires all functions to be defined before they are called.
In order to access the value which is returned by the function, we must store it in a variable. Let's call it feedinfo. The way we assign the output to feedinfo is to call the function as the assignment value.
feedinfo = getlistinfo("dat")
When we implement another data list, we can call the same function, assigning it to a different variable and changing the argument accordingly.
In the next tutorial, we will develop the class for the feed.
Other tutorials in this series:
Part 1 | 2 | 3 | 4
Get the Code!
