top interview questions and answers for Python - PowerPoint PPT Presentation

About This Presentation
Title:

top interview questions and answers for Python

Description:

ODBC stands for Open Database Connectivity. It is the API standard that allows the connections with the database supporting the interface as a PostreSQL database or Microsoft Access. There are 3 ODBC modules for Python 1) PythonWin ODBC module 2) MxODBC 3) pyodbc – PowerPoint PPT presentation

Number of Views:48

less

Transcript and Presenter's Notes

Title: top interview questions and answers for Python


1
Top Interview Questions and answers for Python
  • By
  • Bigclasses

2
  • 1. What is the command used for existing help
    window or for helping command prompt?
  • The command used for existing the help window
    is the quit command. The python shell prompt
    will appear by closing the help window
    automatically.

3
  • 2. How to avoid overload constructors or
    methods in Python?
  • The Pythons constructor_init_() is the first
    method of a class. We can try to instantiate an
    object _init_() is automatically invoked by
    python to initialize members of an object.

4
  • 3. What does the split(), sub(), and subn()
    methods do?
  • The Split() uses a regax pattern to split a
    given string into a list. The Sub() will find all
    the substrings where this regex pattern will
    match and then replace them with a different
    string. Subn() is similar to the Sub(). It
    returns the new string along with the no. of
    replacements.

5
  • 4. Mention the way to display the contents of
    text files in the reverse order
  • Firstly, convert the file into the list.
    Secondly, reverse this list by using reversed().
  • 5. Mention the way to remove duplicates from a
    list
  • You can remove duplicates from the list by
    sorting it from the list, then scanning this list
    from the end, and lastly, delete the duplicate
    elements while scanning the list from
    right-to-left.

6
  • 6. What are an ODBC and Python?
  • ODBC stands for Open Database Connectivity. It
    is the API standard that allows the connections
    with the database supporting the interface as a
    PostreSQL database or Microsoft Access. There are
    3 ODBC modules for Python 1) PythonWin ODBC
    module 2) MxODBC 3) pyodbc

7
  • 7. Is Python object-oriented?
  • Python is object-oriented. It is
    object-oriented programming language. The OOP is
    a programming paradigm based on classes and
    instances of classes. The features of OOP are
    given below
  • Encapsulation
  • Data Abstraction
  • Inheritance
  • Polymorphism

8
  • 8. What does the TkIner do?
  • The TkIner is the library of Python. It is a
    toolkit for the GUI development. It supports
    various GUI tools and even widget that is used in
    the GUI applications. The common attribute of
    them includes Dimensions, Colours, Fonts,
    Cursors, and etc.

9
  • 9. What kind of sequences is supported by
    Python?
  • The Python supports 7 sequences, types. They
    are as follows- str, list, tuple, Unicode, byte
    array, xrange, and buffer.
  • 10. What does the append() and extend() methods
    do?
  • The append() adds the element at the end of the
    list. The extent() adds the elements of another
    list at the end of the list.

10
  • 11. Mention the simple differences between Java
    and Python
  • The Java and Python are used by programmers,
    but the Python is preferred more due to its
    excellent speed of coding. Java has a static type
    data type, and Python has a dynamic typed-data
    type. And Python has a better data science and
    machine learning applications.

11
  • 12. Mention the working of a compile-time and
    run-time code check.
  • Python performs the compile-time checking
    thought some of the checks are postponed like
    name, type, name and etc until the code is
    executed. And if the code references are
    user-defined function doesnt exist, the code
    will then compile successfully. The code might
    even fail with an exception only if it is the
    executed path references the function.

12
To know more details on Python click here
https//bigclasses.com/python-online-training.html
 and call us-  91 800 811 4040For regular
Updates on Python please like our Facebook page-
Facebook- https//www.facebook.com/bigclasses/
Twitter- https//twitter.com/bigclassesLinkedIn
- https//www.linkedin.com/company/bigclasses
Google https//plus.google.com/Bigclassesonlin
ePython Course Page-  https//bigclasses.com/py
thon-online-training.html Contact us - India
91 800 811 4040                                 
             USA 1 732 325 1626Email us at -
info_at_bigclasses.com
13
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com