Python ‘function’ explained

A function is a block of reusable code that performs a single action. Functions enable applications to be modular. Python provides many built-in functions like print(). You can also create your own functions. These are called user-defined functions. To create a function in Python start with the keyword def followed by the function name and parentheses (). Input parameters should go within the parentheses. The code block starts with : and codes [Read More]

Python lists

Spent some time scribbling about Python lists today. Python lists can hold values of mixed data type. They can be fully manipulated and any element can be called from the list at will. Creating a list is as simple as putting comma-separated values between square brackets. mylist = [1,2,3,4,5] Now playing around with lists is fun. Here are methods to add & remove items. Adding an item [Read More]