Python Interview Questions

1) What is Python? What are the benefits of using Python and its main features?
2) What is PEP 8?
3) What Are The Built-In Types Available In Python?
4) What is mutable and immutable objects in python?
5) Difference between remove, pop, del on lists?
6) What is the difference between list and tuple?
7) What are tuples?
8) What is difference between tuple and list ? Where will you use tuple and              where will you use list ?
9) What is Dynamic Typing ?
10) What are *args, **kwargs ?
11) How instance variables are different from class variables?
12) Differentiate between “*.py” file and “*.pyc” file?
13) Explain the use “with” statement in python?
14) What does the “self” keyword do?
15) What Are Different Methods To Copy an Object In Python?
16) What does the <yield> keyword do in Python?
17) What is pickling and unpickling?
18) How are arguments passed by value or by reference?
19) What is namespace in Python?
20) How you can convert a number to a string?
21) What is module and package in Python?
22) What is a pass in Python?
23) Write a function to merge the two lists into one sorted list:
       X = [2, 5, 7, 10, 11, 18]
       Y = [1, 4, 6, 12, 14, 17, 21]
24) How can we get home directory using '~' in Python?
25) Difference between range and xrange?
26) Generators in Python and its use?
27) What are Iterators ?
28) How to debug python code using PDB?
29) What Lambda and use in Python?
30) How does Python handle the memory management?
31) What is monkey patching? How can you do it in Python?
32) Why are functions considered first class objects in Python?
33) How will you reverse the list in Python?
34) Explain how can you generate random numbers in Python?
35) Explain the usage of decorators?

7 comments:

  1. Hi There,


    Hip Hip Hooray! I was always told that slightly slow in the head, a slow learner. Not anymore! It’s like you have my back. I can’t tell you how much I’ve learnt here and how easily! Thank you for blessing me with this effortlessly ingestible
    digestible content.

    I have build a small program with Python3. I'm using urllib.request.urlopen() to download csv files from an open API.
    I save the files with file.write(url). After the download the content is imported to a db (sqlite).
    It works good but I wonder if this is a Pythonic way to do it? Is it possible to save the content in the csv file to a list instead of a file?
    The files are maybe around 1 MB.

    Great effort, I wish I saw it earlier. Would have saved my day :)


    Grazie,
    Minny

    ReplyDelete
  2. Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it h
    as fewer syntactical constructions than other languages.
    python interview questions and answers

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    rpa training in electronic city | rpa training in chennai

    rpa online training | selenium training in training

    ReplyDelete
  7. Good information provided by thanks keep updating
    python online training

    ReplyDelete