You are on page 1of 13

By

Bigclasses
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.
2. How to avoid overload constructors or
methods in Python?

The Python’s 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.
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.
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. 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. 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. 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. 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.
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.
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 doesn’t 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.
To know more details on Python click here https://bigclasses.com/python-
online-training.html and
call us:- +91 800 811 4040

For regular Updates on Python please like our Facebook page:-

Facebook:- https://www.facebook.com/bigclasses/
Twitter:- https://twitter.com/bigclasses
LinkedIn:- https://www.linkedin.com/company/bigclasses
Google+: https://plus.google.com/+Bigclassesonline

Python Course Page:- https://bigclasses.com/python-online-training.html


Contact us: - India +91 800 811 4040
USA +1 732 325 1626
Email us at: - info@bigclasses.com

You might also like