Basic Python Interview Questions 1-10
Basic Python Interview Questions 1-10
1. What is Python?
Python is a high-level, interpreted programming language. It's known for its simplicity, readability,
and versatility. Python is used for web development, automation, data analysis, machine learning,
and more.
- Interpreted language
- Dynamically typed
A variable is a container to store data. In Python, you don't need to declare a data type. Example:
x = 10
- int (integer)
- float (decimal)
- str (string)
- bool (True/False)
Example:
Example:
Example:
def greet():
print('Hello')
Example:
'a' == 'a' is True, but a is b may be False unless a and b refer to the same object.