--
Python is a widely-used general-purpose, high-level programming language. It was created by Guido van Rossum in 1991 and further developed by the Python Software Foundation. It was designed with an emphasis on code readability, and its syntax allows programmers to express their concepts in fewer lines of code. It is used for:
--- #The following are the benefits of using Python language:
Object-Oriented Language High-Level Language Dynamically Typed language Extensive support for Machine Learning Libraries Presence of third-party modules Open source and community development Portable and Interactive Portable across Operating systems
--
Actually, Python is a partially compiled language and partially interpreted language. The compilation part is done first when we execute our code and this will generate byte code internally this byte code gets converted by the Python virtual machine(p.v.m) according to the underlying platform(machine+operating system).
‘#’ is used to comment on everything that comes after on the line.
Mutable data types can be edited i.e., they can change at runtime. Eg – List, Dictionary, etc. Immutable data types can not be edited i.e., they can not change at runtime. Eg – String, Tuple, etc.
The set is unordered collection of unique items that is iterable and mutable.
The location where we can find a variable and also access it if required is called the scope of a variable.
Local variables are those that are initialized within a function and are unique to that function. It cannot be accessed outside of the function.
Global variables are the ones that are defined and declared outside any function and are not specified to any function.
It refers to the global objects of the current module accessible in the program.
It refers to any built-in names that the program can call. The name referenced is located last among the objects in this scope.
A dictionary in Python is an ordered collection of data values, used to store data values like a map.