Today I will share some basic python interview questions for beginners.
Alert: Try to answer the questions yourself before looking out at the answers . In addition to this, if you want to get Pdfs of more advanced questions comment below.
Python Exercise Basics Date- 06 Nov. 20
Q1: What are namespaces in python?
Q2: Which is the latest python version released?
Q3: How to verify if python is installed on your system?
Q4: How can we launch Python Interactive shell in command line?
Q5: What are the three different ways to close a python shell?
Q6: How can I print string in command line without creating a python file?
Q7: How to check variable defined by you is not in the predefined keyword list
Q8: How to check the type of variable in python?
Q9: How can you assign multiple values to multiple variables in one line in python?
Q10: Which symbol is used by python as its indentation?
Q11: Which is PEP8 style of Indentation?
Now , answers are :
Ans1: A namespace is a collection of names. In Python, you can imagine a namespace as a mapping of every name you have defined to corresponding objects.
A2 : python 3.9.0 released on 5th October 2020
A5 : exit() ,quit() or press ctrl+D
A6: python -c ‘print(“Hello World”)’
import keyword print(keyword.kwlist)
A9: : a,b,c = 1,2,3
A10: Colon symbol (:)
A11: to use 4spaces instead of using tabs
To know more about python interview questions for intermediate and advanced levels ,comment below.