Lambda functions in return statement

Lesson Details:
June 29, 2020


I: Introduction

Python is an interpreted language, meaning that it is not compiled before execution. It is a high-level language. It is general-purpose. It is object-oriented.

It can be used to create applications, scripts for web servers, games, graphics, artificial intelligence, etc.

The features of Python are:

1) Easy to learn

2) Extensive library of modules

3) Freely available

4) Extensibility

5) Runs on different platforms

B: Basic programming of python language

Python is really easy to learn. You need to learn the basic syntax of the language before starting to write programs in Python. The Python language has its own style which you must follow while writing code.

The basic rules are mentioned below:

Indentation plays an important role in Python. For example, if you want to define a function which consists of two lines of code, then you need to indent the second line by four spaces. If you do not follow this rule then you will get an error message while executing the program. The following image shows how the code should look like when properly indented.

You can open an interactive Python interpreter by typing "python" on the command prompt. It has two modes - "Interactive Mode" and "Script Mode". To run a program in Script Mode, you need to save the script in a file. Then you need to execute the file using the command prompt. If you want to run it in Interactive Mode, then you will type your statements in the interpreter and press enter after each statement. For example:

loader
Course content