Python Interview Questions You'll Most Likely Be Asked

Price: $19.95


Qty. 
+-

Python Interview Questions You'll Most Likely Be Asked is a perfect companion to stand ahead above the rest in today’s competitive job market. Rather than going through comprehensive, textbook-sized reference guides, this book includes only the information required immediately for job search to build an IT career. This book puts the interviewee in the driver's seat and helps them steer their way to impress the interviewer.

 

 

Table of Contents
1. General Python Concepts
2. Python Looping
3. Python Conditionals
4. String Manipulation
5. Python Data Types
6. File Manipulation
7. Python Thread Management
8. Python Database Interface
9. Python Internet Communication
10. HTML / XML in Python
11. HR Questions
12. INDEX
 
 

Includes:

 

a) 200 Python Interview Questions, Answers and Proven Strategies for getting hired as an IT professional

b) Dozens of examples to respond to interview questions

c) 51 HR Questions with Answers and Proven strategies to give specific, impressive, answers that help nail the interviews

d) 2 Aptitude Tests download available on www.vibrantpublishers.com

 

 

Sample from the book
(Below Questions and Answers are randomly taken from different pages of the book)
 

31: Given the string “I Love Python” print out each character except for the spaces, using a for loop.

Answer:

myString = “I Love Python”

for myChar in myString:

if myChar == ‘ ’:

continue

print myChar

 

32: Illustrate how to execute a loop ten times.

Answer:

i = 1

while i < 10:

...

i += 1

 

33: When using a while loop, a condition was encountered that made staying in the loop pointless, what statement is used to transfer control?

Answer:

The break statement is used to terminate processing of the loop and move on to the next block of code.

 

104: What does the ‘b’ modifier do when appended to a file mode?

Answer:

It changes the handling of the file from text to binary mode.

 

105: What does the ‘U’ modifier do when appended to a file mode?

Answer:

It applies the universal new-line translator to the file when it is opened.

 

106: How is the buffer size specified in file opening?

Answer:

It is an optional parameter to the open function. A 0 indicates the file is unbuffered, 1 indicates that line by line buffering. Any other positive number is the actual buffer size to be allocated.

 

160: Illustrate retrieving a list of available tables in a MySQL database.

Answer:

import MySQLdb

myDB = MySQLdb.connect(host=”127.0.0.1”, user=”username”, passwd=”password”)

myCursor = myDB.cursor()

myCursor.execute(“SHOW TABLES”)

myResults = myCursor.fetchall()

 

 

169: Illustrate retrieving the number of messages available on a mail server.

Answer:

Import poplib

myPOP = poplib.POP3(‘mail.example.org’)

mPOP.user(“Me@example.org’)

mPOP.pass_(“myPassword”)

myMessageCount = len(mPOP.list()[1])

 

182: Illustrate parsing a URL into a tuple.

Answer:

Import urlparse

myTuple = urlparse.urlparse(“http://www.example.com/mydirectory/

myfile.html”)

 

190: Illustrate retrieving a cookies from a URL.

Answer:

Import urllib2

Import cookielib

myJar= cookielib.LWPCookieJar()

myOpener = urllib2.build_opener( urllib2.HTTPCookieProcessor(myJar))

urllib2.install_opener(myOpener)

myRequest =urllib2. Request(“http://www.example.org/”)

myHTML = urllib2.urlopen(myRequest)

for cookie in enumerate(myJar)

print cookie