python important interview questions.

Question 1. What Is Python? What Are The Benefits Of Using Python?
Answer :
Python is a programming language with objects, modules, threads, exceptions and automatic memory management. The benefits of pythons are that it is simple and easy, portable, extensible, build-in data structure and it is an open source.
Question 2. How Python Can Be Used In Software Testing?
Answer :
To generate test data; parse test results; generate reports; testing API calls etc.
Python to extract requirements from a Word document.
For testing tasks automation, setting up environments for tests, extracting performance data, etc…
Testers use Python extensively in many companies with Selenium for test automation.
For writing desktop applications used by testers.
Test data manipulation.
To build test environment
Testing with IronPython on .NET
Question 3. What Python Frameworks Do You Know?
Answer :Framework called Web2py, PAMIE (Python automation Module for I. E.), The py.test framework
Question 4. What Tools That Helps Python Development Do You Know?
Answer :There are good tools for helping Python development such as Notepad++ with the PyNPP plugin and Eclipse with PyDev and PyUnit
Question 5. The Following Is Displayed By A Print Function Call: Yesterday Today Tomorrow Please Write An Example Of A Print Function?
Answer :print(‘yesterdayntodayntomorrow’)
Question 6. The Following Is Displayed By A Print Function Call?
Answer :hello-how-are-you
Question 7. Please Write An Example Of A Print Function?
Answer :print(‘hello’ + ‘-‘ + ‘how’ + ‘-‘ + ‘are’ + ‘-‘ + ‘you’)
Question 8. What Does The Expression Len(”) Evaluate To?
Answer :0
Question 9. Considering The Following Code: S = ‘catandapple’ Write An Expression That Evaluate To ‘apple’?
Answer :s[-5:]
Question 10. Write An Expression That Evaluate To True?
Answer :len(‘aaddgg’) == 6
Question 11. What Are “tuples”?
Answer :Tuples are immutable sequences: they cannot be modified. Tuples use parentheses instead of square brackets: tup = (‘test’, 5, -0.2)
Question 12. What Are The Rules For Legal Python Names?
Answer :
Names must start with a letter 

Comments