Python Interview questions - files & file operations
(Python version 3.9 or later version)
Which of the following Python objects is immutable?
set
dict
list
str
Explanation
Please click here for explanation
What would be the result of executing the following code?
print
(
True
*
2
)
TrueTrue
True True
2
Syntax Error
Explanation
Please click here for explanation
Python Interview Questions
Python - File Operations
1. Python files end with what extension?
A) .exe
B) .python
C) .py
Answer: .py