• Mon - Sat 10.00 - 18.00
  • AED Hospital 5th Floor, K P H B Phase 1, Kukatpally, Hyderabad
  • +91 96525 32753
REQUEST FOR A FREE DEMO
Blog
Cart
Upcoming Batches
  • Home
  • About Us
  • Checkout
  • Downloads
HARSHA TRAININGS
Category
Advanced JAVA
BPM
Cloud and DevOps Technologies
AWS+Azure+Google Cloud Infrastructure with DevOps
Fast Track Batch AWS+Gcp+Azure+DevOps
Fast Track Batch DevOps+Aws+Gcp+Azure
CRM
Data Science
Data Science
Digital Marketing
Digital Marketing
ETL Tool
Talend DI (Data Integration)
Hacking
HCM Functional
Integrations
PEGA
PEGA CPDC
PEGA PRPC
PEGA PRPC Fastrack
Reporting Tools
Power BI
Tableau
Software Testing
Web Technologies
Full Stack Development
MEAN Stack Development
UI Development
UI/UX Designing
{{ search }}
Become Instructor
LogIn/SignUp

Login/Sign Up

Courses Favorites 0

Search

Category
Advanced JAVA
BPM
Cloud and DevOps Technologies
AWS+Azure+Google Cloud Infrastructure with DevOps
Fast Track Batch AWS+Gcp+Azure+DevOps
Fast Track Batch DevOps+Aws+Gcp+Azure
CRM
Data Science
Data Science
Digital Marketing
Digital Marketing
ETL Tool
Talend DI (Data Integration)
Hacking
HCM Functional
Integrations
PEGA
PEGA CPDC
PEGA PRPC
PEGA PRPC Fastrack
Reporting Tools
Power BI
Tableau
Software Testing
Web Technologies
Full Stack Development
MEAN Stack Development
UI Development
UI/UX Designing
{{ search }}
Become Instructor

Menu

  • Home
  • About Us
  • Checkout
  • Downloads

Top 121 PYTHON Interview Questions and Answers:

  • December 11, 2020
  • Posted by: AtoZ Trainings
  • Category: Interview Questions
No Comments
PEGA Tutorials

1) What is the python language?
A) Python is a general purpose, object oriented programing language and python syntax is very simple and readable language.

2) What are benefits /advantages in python?
A) Python is must for students and working professional and python language is interactive and GUI (Graphical User Interphase) language.

3) What is Python Path?
A) Adding Python to Windows Path in 2 ways.

  1. Via installation of recent / latest version of python.
  2. Manual entry of the paths.

4) What is python interpreter?
A) Python interpreter takes the code that you write and converts into language that computer can understand and human readable.
Interpreter executes line by line (asynchronous timers).

5) Is the Python Object Oriented Programming?
A) Yes, python is strictly object oriented programing language is intuitive high level, multi paradigm programing language it supports multiple programing language and cross platform, free and open source technology.

6) What are the data types in python?
A) Python data types 6 types

  1. Strings
  2. Number
  3. List
  4. Tuple
  5.  Set
  6. Dictionary

7) How to install python in mac and windows?
A) Open python official website (python.org) and click download button and find the right version python language as per our system configuration and the right one and double click on application and follow the instruction.

8) What is pip in python?
A) Pip stands for python package index. Python package are not part of the standard library and pip enables third party package index.
Pip come with by default in the latest version of python.

9) How to install python package (PIP)?
A) Using simple Command you can install, pip –m install.

10) How to comment multiple lines in python?
A) In python language u can comment code with the # symbol.

Example: # this is the python comment, python comment will Ignore the code and content.

11) What is pep 8?
A) Pip stands for python enhancement proposal (pep 8) and pep the latest version is 8. Pep 8 holds great community generated proposals.

12) What is the latest python version?
A) Present latest version of python is 3.9.1 . We can check the python version by using this command (python -version).

13) What are data type’s supporters?
A) Python data types are of 6 types.

  1. Strings
  2. Number
  3. List
  4. Tuple
  5.  Set
  6. Dictionary

14) What is PYTHONPATH?
A) Python path is an environment variable which is used when a module is imported. Whenever a module is imported, PYTHONPATH is also looked up to check for the presence of the imported modules in various directories. The interpreter uses it to determine which module to load.

15) Is python case sensitive?
A) Yes, Python is a case sensitive language.

16) What is type conversion & list out some of in Python?
A) Type conversion refers to the conversion of one data type to another data type.
Some of the type conversions bellow:

  1. int() – converts any data type into integer type
  2. float() – converts any data type into float type
  3. list() – This function is used to convert any data type to a list type.
  4. str() – This function Used to convert integer into a string.
  5. complex(real, image) – This function converts real numbers to complex(real, imag) number.

17) How to change capitalize the first letter of string?
A) In Python, the capitalize() method capitalizes the first letter of a string. If a string already consists of a capital letter at the beginning, then, it returns to the original string.

18) Can you convert a string to all lowercase, give some example?
A) To convert a string to lowercase, lower() function can be used.

Example:

my_string = ‘This is Python Lowercase String’
Print(my_string.lowercase())

19) What is PEP 8?
A) Pep 8 is a style guide & set of recommendations from the community, about how to write Python code more readable & easier to understand. We use this bring consistency in our code; with consistency it is easier for other developers to read the code.

20) What are the built-in types in python?
A) They are of two types mutable and immutable

Mutable built-in types are:

  1. List
  2. Sets
  3. Dictionaries

Immutable built-in types are:

  1. Strings
  2. Tuples
  3. Numbers

21) What are supported data types in python?
A) Python has five supported data types

  1. Numbers
  2. String
  3. List
  4. Tuple
  5. Dictionary

22) How to remove last object from a list?
A) To remove and return last object or object from list use this command;

list.list.pop(obj=list[-1])

23) What is slicing in Python?
A) Slicing is a string operation for extracting a part of the string, or some part of a list items. It can also perform reverse indexing, i.e., in the backward direction, with the help of negative numbers. It is a mechanism to select a range of items from sequence types like list, tuple, strings etc.

24) What Is %s in Python?
A) Python has supported for formatting any value into a string. It may contain quite complex expressions. One of the common usages is to push values into a string with the %s format specifier. The formatting operation in Python has the comparable syntax as the C function printf() has.

25) How can you copy an object in Python?
A) To copy an object in Python,

  1. you can try copy.copy () or copy.deepcopy() for the general case.
  2. You cannot copy all objects but most of them.

26) Explain how to convert a number to a string?
A) To convert a number into a string, we can use the inbuilt function str().  For octal or hexadecimal representation, use the inbuilt function oct() or hex().

def convert_num_to_str(num):
str_num = str(num)
return str_num
# def convert_num_to_str(3) –> should return “3”

Angular Angular Training Data Science with Python Express JS Express JS Training Full Stack Development Harsha Trainings Mean Stack Development Node JS Node JS Training Python Python Certification Guidance Python Certification Training Python Certification Training in Bangalore Python Certification Training in Chennai Python Certification Training in Hyderabad Python Development Certification Python Development Certification Training Python Development Job Assistance Python Development Job Support Python Development Training Python Development Training in Bangalore Python Development Training in Chennai Python Development Training in Hyderabad Python Interview Job Support Python Job Assistance Python Job Certification Guidance Python Job Guidance Python Job Interview Assistance Python Job Support Python Job Training Assistance Python Training Python Training Guidance Python Web Development Training Python with DJango Python with Web Development UI Designers UI Developers UI Development Ui/UX Design Training UX Designers UX Developers Web Development with DJango

Author:Yoktha

A to Z Trainings

Leave a Reply Cancel reply

You must be logged in to post a comment.

About Us

Harha Trainings is providing complete software trainings on PEGA, Data Science, Python, Amazon Web Services (AWS), DevOps, Microsoft Azure, Big data Analytics, UI/UX Designing, Full Stack Development, MEAN Stack Development, UI Development & Digital Marketing. We are passionate about bridging the gap between learning and real-time implementation, so empowering individuals to be industry ready and help firms in reaping huge benefits is our primary goal.

Popular Courses

  • Selenium with JAVA C# Course Content
    INR. 18,000
    By Harsha Pega
  • Workday HCM Techno-Functional Cour...
    INR. 33,000
    By Harsha Pega
  • DEVOPS & CLOUD Technologies (...
    INR. 28,000
    By Harsha Pega
  • APPIAN TECHNOLOGY
    INR. 22,000
    By Harsha Pega

Quick Links

  • Cancellation & Refund Policy
  • Contact Us
  • Privacy Policy
  • Terms and Conditions

Contact Us

  • AED Hospital 5th Floor, K P H B Phase 1, Kukatpally, Hyderabad
  • Tel.: +91 96525 32753
  • info@harshatrainings.com

We are accepting and SAFE Checkout Pyament Methods:

© All Copyrights Reserved 2020. HARSHA TRAININGS by YOKTHA Technologies
  • Home
  • About Us
  • Checkout
  • Downloads
Search