Python Functions

Parameter Passing in Python

In the previous article, we have explored variable length arguments, now we will look at Parameter Passing in Python. When we pass a parameter to a function, how is it passed? Does it contain the same reference to a variable or a different variable, if we make any changes to this variable is it reflected …

Read more

How Functions Work in Python

In the previous article, we discussed the applications/advantages of using Functions in Python, now we will examine how functions work in Python. Before we delve further let us look at an example program. What would the output of the above code look like? Analyzing How Functions Work in Python The program from earlier would result …

Read more

Functions in Python

In the previous article, we saw how we could optimize code for two different problems. There is another way in which we can increase the effectiveness of code, that is true the use of in-built functions or user-defined rather than the use and repeat of long lines of code. So in this article, we will …

Read more

Comprehensions in Python

In the previous article we saw how we could obtain the even and odd elements of a list, separately and return them. Now we will explore the concept of Comprehensions in Python with regards to lists, sets and dictionaries. What is List Comprehension? List Comprehension provides us a shortcut to create a new list from …

Read more

Python terminology: Keywords, Variables, Functions, Packages and Modules

In the last article we have gone through the definition of programming languages, have discussed the Python programming language along with it’s basic syntax, benefits, usage and some concepts which Python follows. In today’s article we will have a look at the python programming structure, some more statements, and other fundamental python concepts. Python terminologies …

Read more