Call Us Now!
+91 9884412301 | +91 9600112302
info@credosystemz.com
Credo SystemzCredo Systemz
  • Courses
    • TRENDING TECHNOLOGIES TRAINING
    • RPA TRAINING
    • CLOUD COMPUTING TRAINING
    • BIG DATA TRAINING
    • WEB DEVELOPMENT TRAINING
    • MOBILE APPLICATION TRAINING
    • SOFTWARE TESTING TRAINING
    • MICROSOFT TECHNOLOGIES TRAINING
    • JAVA TRAINING
    • PROJECT MANAGEMENT TRAINING
    • DATA WAREHOUSING TRAINING
    • ORACLE TRAINING
    • DATABASE DEVELOPER TRAINING
    • OTHER TRAININGS
    • TRENDING TECHNOLOGIES
      Python Training Data Science Training Angular Training React JS Training ORACLE PRIMAVERA TRAINING Machine Learning Training Hadoop Training Amazon Web Services Training DevOps Training Azure Training PySpark Training MEAN Stack Training
    • RPA TRAINING
      Blue Prism Training UiPath Training Automation Anywhere
    • CLOUD COMPUTING
      Amazon Web Services Training AWS with Devops Training Azure Training AZ 104 Azure Administrator AZ 204 Azure Developer AZ 300 Azure Architect AZ 303 Azure Architect AZ 400 Azure Devops Google Cloud Platform Salesforce Training OpenNebula Training OpenStack Training OpenSpan Training
    • BIG DATA TRAINING
      Hadoop Training Big Data Analytics Training Spark Training
    • WEB DEVELOPMENT
      Angular Training Node JS Training React JS Training React Native Training Ionic Framework Training MEAN Stack Training PHP Training JavaScript Training CoffeeScript Training Less JS Training Graphics Design Training HTML Training CSS Training
    • MOBILE APPLICATION
      Android Training iOS Training iOS Swift Training Kotlin Training Flutter Dart Training
    • SOFTWARE TESTING
      Manual Testing Training UFT / QTP Training Selenium Training API Testing Training Selenium with Python Training Perfecto Mobile Testing Training ETL Testing Training JMeter Training LoadRunner Training Performance Engineering Big Data Testing Training Protractor Testing Training
    • MICROSOFT TECHNOLOGIES
      Dot Net Training MVC Framework ASP.NET MVC with Angular SharePoint Training Advanced Excel Training Excel Macro Training Azure Training Azure Infrastructure Solutions AZ 300 Azure Architect
    • JAVA TRAINING
      Core Java Training Java 8 Training Java J2EE Training Advanced Java Training Hibernate Training Spring Training Struts Training
    • PROJECT MANAGEMENT
      Oracle Primavera Training Primavera P6 Online Training Microsoft Project Training PMP Training ITIL Training Prince2 Training Scrum Master Training Business Analytics Training
    • DATA WAREHOUSING
      Tableau Training Power BI Training Qlikview Training Qlik Sense Training Informatica Training Microstrategy Training Teradata Training Cognos Training SAS Training
    • ORACLE TRAINING
      Oracle PL/SQL Training Oracle DBA Training Oracle Apps Technical Training Oracle Apps SCM Training Oracle Apps HRMS Training Oracle Apps Finance Training Oracle RAC Training PeopleSoft HCM Training PeopleSoft Finance Training
    • DATABASE DEVELOPER
      MongoDB Training Apache Cassandra Training Sybase Training Informix Training Performance Tuning Training
    • OTHER TRAININGS
      Ethical Hacking Training C C++ Training Unix Shell Scripting Training Tensorflow Training Data Modeling Training Workday Training PEGA Training Digital Marketing Training CCNA Training Arduino Training Elm Training Go Programming Training Rust Programming Training CYBER SECURITY TRAINING BIZTALK SERVER TRAINING Spoken English Course
  • Fresher Courses
    • ANGULAR TRAINING
    • REACT TRAINING
    • PYTHON TRAINING
    • JAVA TRAINING
    • SELENIUM TRAINING
  • Placements
    • Career Guidance
      • Interview Questions
      • Resume Building
      • Job Opportunities
    • OVERALL PLACEMENTS
  • About Us
    • Online Training
    • Corporate Training
    • Events
    • Reviews
      • Video Reviews
    • Become an instructor
  • Training
    • Trending Technologies Training
    • RPA TRAINING in Chennai
    • Cloud Computing Training
    • Big Data Hadoop Training in Chennai
    • Web Development Training
    • Mobile Application Training
    • Software Testing Training
    • Microsoft Technologies Training
    • Java Training
    • Project Management Training
    • Data Warehousing Training
    • Oracle Training
    • Database Developer Training
    • Other Training
  • Blogs
    • GENERAL
      • TOP SKILL TO GET A JOB IN MNC
      • INTERVIEW TIPS FOR FRESHERS AND EXPERIENCE
      • TOP TRENDING TECHNOLOGIES
    • DATA SCIENCE
      • MACHINE LEARNING VS DATA SCIENCE
      • DATA SCIENCE INTERVIEW QUESTION AND ANSWER
    • PYTHON
      • WHY LEARN PYTHON
      • JAVA VS PYTHON
      • WHAT IS PYTHON
    • PRIMAVERA
      • LIFECYCLE OF PRIMAVERA
      • EPPM VS PPM
      • PROJECT MANAGEMENT STEPS
    • PMP
      • PMP CERTIFICATION
    • AWS
      • TOP 5 AWS SERVICES
      • AWS VS OPENSTACK
      • AMAZON VS AZURE VS GOOGLE CLOUD
      • WHY DEVELOPERS SHOULD LEARN AWS
    • ANGULAR
      • ANGULAR INTERVIEW QUESTIONS
      • ANGULAR VS REACT VS VUE
    • REACT
      • TOP REASON TO LEARN REACT
    • BLUE PRISM
      • BLUE PRISM VS UI PATH
      • WHAT IS RPA
    • UI PATH
      • RPA CERTIFICATION
    • CLOUD COMPUTING
      • BEST CLOUD COMPUTING SERVICES
    • DEVOPS
      • DEVOPS OVERVIEW
    • NODE JS
      • NODE JS CERTIFICATION
    • HADOOP
      • HADOOP CERTIFICATION
    • AZURE
      • AZURE CERTIFICATION
    • SOFTWARE TESTING
      • HOW TO BECOME A SOFTWARE TESTER
      • MOVE FROM MANUAL TO AUTOMATION TESTING
      • HOW MUCH IS JAVA REQUIRED FOR SELENIUM TESTING
  • Contact Us
  • Courses
    • TRENDING TECHNOLOGIES TRAINING
    • RPA TRAINING
    • CLOUD COMPUTING TRAINING
    • BIG DATA TRAINING
    • WEB DEVELOPMENT TRAINING
    • MOBILE APPLICATION TRAINING
    • SOFTWARE TESTING TRAINING
    • MICROSOFT TECHNOLOGIES TRAINING
    • JAVA TRAINING
    • PROJECT MANAGEMENT TRAINING
    • DATA WAREHOUSING TRAINING
    • ORACLE TRAINING
    • DATABASE DEVELOPER TRAINING
    • OTHER TRAININGS
    • TRENDING TECHNOLOGIES
      Python Training Data Science Training Angular Training React JS Training ORACLE PRIMAVERA TRAINING Machine Learning Training Hadoop Training Amazon Web Services Training DevOps Training Azure Training PySpark Training MEAN Stack Training
    • RPA TRAINING
      Blue Prism Training UiPath Training Automation Anywhere
    • CLOUD COMPUTING
      Amazon Web Services Training AWS with Devops Training Azure Training AZ 104 Azure Administrator AZ 204 Azure Developer AZ 300 Azure Architect AZ 303 Azure Architect AZ 400 Azure Devops Google Cloud Platform Salesforce Training OpenNebula Training OpenStack Training OpenSpan Training
    • BIG DATA TRAINING
      Hadoop Training Big Data Analytics Training Spark Training
    • WEB DEVELOPMENT
      Angular Training Node JS Training React JS Training React Native Training Ionic Framework Training MEAN Stack Training PHP Training JavaScript Training CoffeeScript Training Less JS Training Graphics Design Training HTML Training CSS Training
    • MOBILE APPLICATION
      Android Training iOS Training iOS Swift Training Kotlin Training Flutter Dart Training
    • SOFTWARE TESTING
      Manual Testing Training UFT / QTP Training Selenium Training API Testing Training Selenium with Python Training Perfecto Mobile Testing Training ETL Testing Training JMeter Training LoadRunner Training Performance Engineering Big Data Testing Training Protractor Testing Training
    • MICROSOFT TECHNOLOGIES
      Dot Net Training MVC Framework ASP.NET MVC with Angular SharePoint Training Advanced Excel Training Excel Macro Training Azure Training Azure Infrastructure Solutions AZ 300 Azure Architect
    • JAVA TRAINING
      Core Java Training Java 8 Training Java J2EE Training Advanced Java Training Hibernate Training Spring Training Struts Training
    • PROJECT MANAGEMENT
      Oracle Primavera Training Primavera P6 Online Training Microsoft Project Training PMP Training ITIL Training Prince2 Training Scrum Master Training Business Analytics Training
    • DATA WAREHOUSING
      Tableau Training Power BI Training Qlikview Training Qlik Sense Training Informatica Training Microstrategy Training Teradata Training Cognos Training SAS Training
    • ORACLE TRAINING
      Oracle PL/SQL Training Oracle DBA Training Oracle Apps Technical Training Oracle Apps SCM Training Oracle Apps HRMS Training Oracle Apps Finance Training Oracle RAC Training PeopleSoft HCM Training PeopleSoft Finance Training
    • DATABASE DEVELOPER
      MongoDB Training Apache Cassandra Training Sybase Training Informix Training Performance Tuning Training
    • OTHER TRAININGS
      Ethical Hacking Training C C++ Training Unix Shell Scripting Training Tensorflow Training Data Modeling Training Workday Training PEGA Training Digital Marketing Training CCNA Training Arduino Training Elm Training Go Programming Training Rust Programming Training CYBER SECURITY TRAINING BIZTALK SERVER TRAINING Spoken English Course
  • Fresher Courses
    • ANGULAR TRAINING
    • REACT TRAINING
    • PYTHON TRAINING
    • JAVA TRAINING
    • SELENIUM TRAINING
  • Placements
    • Career Guidance
      • Interview Questions
      • Resume Building
      • Job Opportunities
    • OVERALL PLACEMENTS
  • About Us
    • Online Training
    • Corporate Training
    • Events
    • Reviews
      • Video Reviews
    • Become an instructor
  • Training
    • Trending Technologies Training
    • RPA TRAINING in Chennai
    • Cloud Computing Training
    • Big Data Hadoop Training in Chennai
    • Web Development Training
    • Mobile Application Training
    • Software Testing Training
    • Microsoft Technologies Training
    • Java Training
    • Project Management Training
    • Data Warehousing Training
    • Oracle Training
    • Database Developer Training
    • Other Training
  • Blogs
    • GENERAL
      • TOP SKILL TO GET A JOB IN MNC
      • INTERVIEW TIPS FOR FRESHERS AND EXPERIENCE
      • TOP TRENDING TECHNOLOGIES
    • DATA SCIENCE
      • MACHINE LEARNING VS DATA SCIENCE
      • DATA SCIENCE INTERVIEW QUESTION AND ANSWER
    • PYTHON
      • WHY LEARN PYTHON
      • JAVA VS PYTHON
      • WHAT IS PYTHON
    • PRIMAVERA
      • LIFECYCLE OF PRIMAVERA
      • EPPM VS PPM
      • PROJECT MANAGEMENT STEPS
    • PMP
      • PMP CERTIFICATION
    • AWS
      • TOP 5 AWS SERVICES
      • AWS VS OPENSTACK
      • AMAZON VS AZURE VS GOOGLE CLOUD
      • WHY DEVELOPERS SHOULD LEARN AWS
    • ANGULAR
      • ANGULAR INTERVIEW QUESTIONS
      • ANGULAR VS REACT VS VUE
    • REACT
      • TOP REASON TO LEARN REACT
    • BLUE PRISM
      • BLUE PRISM VS UI PATH
      • WHAT IS RPA
    • UI PATH
      • RPA CERTIFICATION
    • CLOUD COMPUTING
      • BEST CLOUD COMPUTING SERVICES
    • DEVOPS
      • DEVOPS OVERVIEW
    • NODE JS
      • NODE JS CERTIFICATION
    • HADOOP
      • HADOOP CERTIFICATION
    • AZURE
      • AZURE CERTIFICATION
    • SOFTWARE TESTING
      • HOW TO BECOME A SOFTWARE TESTER
      • MOVE FROM MANUAL TO AUTOMATION TESTING
      • HOW MUCH IS JAVA REQUIRED FOR SELENIUM TESTING
  • Contact Us

Infosys Python Interview Questions

  • Home
  • Infosys Python Interview Questions

INFOSYS – Python Interview Questions

Here is the list of Python Interview Questions which are recently asked in Infosys company. These questions are included for both Freshers and Experienced professionals. Our Python Training has Answered all the below Questions.


1. What is Python?

Python is a high-level, interpreted, interactive and object-oriented scripting language that is used to create user interface applications for web development (server side), software development, mathematics, operation and so on.

Python is a general-purpose interpreted, interactive, object-oriented programming language.

2. Why can't I use an assignment in an expression?

The reason for not allowing assignment in Python expressions is a common, hard-to-find bug in those other languages, caused by this construct:

if (x = 0) {
...error handling...
}
else {
...code that only works for nonzero x...
}

The error is a simple typo: x = 0, which assigns 0 to the variable x, was written while the comparison x == 0 is certainly what was intended.

3. Is there a toolto help find bugs or perform static analysis?

Pychecker and Pylint are the static analysis tools that help to find bugs in python. Pychecker is an open source tool for static analysis that detects the bugs from source code and warns about the style and complexity of the bug

4. How do you set a global variable in a function?

Normally, when you create a variable inside a function, that variable is local, and can only be used inside that function. To create a global variable inside a function, you can use the global keyword

5. What are the rules for local and global variables in Python?

  • In python, the variables referenced inside a function are global.
  • When a variable is assigned new value anywhere in the body of a function then it is assumed as local.
  • In a function, if a variable ever assigned new value then the variable is implicitly local and explicitly it should be declared as global.

Interview Questions based on Experience - Click here - Python Interview Questions and Answers

6. How can we create an empty class in Python?

In Python, to write an empty class pass statement is used. Pass is a special statement in Python that does nothing. It only works as a dummy statement. However, objects of an empty class can also be created.

7. What are the key features of Python?

Python is a dynamic, high level, free open source and interpreted programming language. It supports object-oriented programming as well as procedural oriented programming. In Python, we don't need to declare the type of variable because it is a dynamically typed language.

8. What is the difference between list and tuple in Python?

One of the most important differences between list and tuple is that list is mutable, whereas a tuple is immutable. This means that lists can be changed, and tuples cannot be changed.

9. List steps for setting up static files in Django?

  • set STATIC_ROOT in settings.py
  • run python2.7 manage.py collectstatic (or python3.5 or python3.6 as appropriate)
  • Set up a Static Files entry on the PythonAnywhere Web tab.

10. What is Dogpile effect?

The Dogpile effect occurs when cache expires and websites are hit by numerous requests the same time. Dogpile effect can be prevented using semaphore lock.

11. How do I share global variables across modules?

In the update.py file, we import the config.py module and modify the values of a and b . Similarly, in the main.py file, we import both config.py and update.py module. Finally, we print and test the values of global variables whether they are changed or not.

12. How do we reverse a list in Python?

Reversing a list in-place with the list. reverse() method. Using the “[::-1]” list slicing trick to create a reversed copy. List comprehension and loop statement can also help.

13. How can Python be an interpreted language?

Python is called an interpreted language because it goes through an interpreter, which turns code you write into the language understood by your computer's processor. Python is an “interpreted” language. This means it uses an interpreter. An interpreter is very different from the compiler.

14. What do you understand by the term PEP 8?

PEP 8 stands for Python Enhancement Proposal which ,is Python's style guide. It's a set of rules for how to format your Python code to maximize its readability.

Writing code to a specification helps to make large code bases, with lots of writers, more uniform and predictable, too.

15. Define slicing in Python?

Python slicing is about obtaining a sub-string from the given string by slicing it respectively from start to end. Python slicing can be done in two ways.

slice() Constructor ,Syntax string[start:end:step] start, end and step have the same mechanism as slice() constructor.

16. How can I pass optional or keyword parameters from one function to another?


To pass the keywords from func() into funcy(),
def func (**kwargs):
 print('func kwargs:', kwargs)
def funcy (a, b, c, **kwargs):
  print('other args:', a, b, c)
  print('keyword args:', kwargs)
def funcy(a, b, c, **kwargs):
    print('other args:', a, b, c)
    print('keyword args:', kwargs)
    func(**kwargs)

17. How do you make a higher order function in Python?

A higher-order function accepts one or more functions as input and returns a new function. Sometimes it is required to use function as data. - To make high order function , we need to import functools module.

18. How do I copy an object in Python?

In Python, there are two ways to create copies :
  • Deep copy
  • Shallow copy

19. How can I find the methods or attributes of an object?

Attributes of a class can also be accessed using the following built-in methods and functions:
  • getattr() – This function is used to access the attribute of object.
  • hasattr() – This function is used to check if an attribute exist or not.
  • setattr() – This function is used to set an attribute.

20. How do I convert a string to a number?

In Python an strings can be converted into a integer using the built-in int() function. The int() function takes in any python data type and converts it into a integer

Related Blogs

Top Python Libraries
To Learn In 2023

Python is used seamlessly for the trending technologies like Artificial intelligence,web development, scripting, game development,

Top Python Development
Trend In 2023

Python Programming which is currently a trending programming language in the era of information technology,

Why Python Is So
Hot Right Now

Knowledge drop!! Python programming which is one of the high level interpreted general purpose programming language

Related Tags

Python Training in Chennai | Azure Certification Training in Chennai | Dot Net Training in Chennai | Selenium Course in Chennai | DevOps Training in Chennai | Data Science Online Training | AWS Certification Training in Chennai | Angular Course in Chennai | React JS Training in Chennai | GCP Training in Chennai | Java Online Training with Placements

other top mnc Python Interview Q&A

  • TCS
  • Infosys
  • IBM
  • Capgemini
  • Cognizant
  • Wipro
  • HCL
  • DXC Technology
  • Contus
  • Fidelity
  • Tech Mahindra
  • L & T
  • FIS
  • Dell
  • Accenture

Python Latest News

Python Growth

According to a Forbes report on ‘technical skills with huge demand’, Python is listed top on the list, with a growth rate of 456% last year.

Python Annual Salary

The Average salary for Python Developer is 4, 42,713 per year in Indian based on 770 salaries submitted to Glassdoor by Python Developer employees.

INDIA LOCATIONS

New #30,Old #16A,
Rajalakshmi Nagar, Velachery,
Chennai - 600 042.
Mobile: +91 9884412301

Plot No.8, Vinayaga Avenue,
Rajiv Gandhi Salai, Okkiampettai(OMR),
Chennai – 600 097.
Mobile: +91 9600112302

Refund/Cancellation Policy

INTERNATIONAL LOCATIONS

USA
Houchin Drive, Franklin, TN -37064
Tennessee
Email: info@credosystemz.com
Web: www.credosystemz.com
Chat With Us

UAE
Sima Electronic Building,
LLH Opposite,
Electra Street – Abu Dhabi
Email: info@credosystemz.com
Web: www.credosystemz.com
Chat With Us

TRENDING COURSES

  • Python Training in Chennai
  • Data Science Training in Chennai
  • AWS Training in Chennai
  • Big Data Hadoop Training in Chennai
  • Machine Learning Training in Chennai
  • Selenium Training in Chennai
  • Angular Training in Chennai
  • Oracle Primavera P6 Online Training
  • Mean Stack Training in Chennai
  • DevOps Training in Chennai
  • Microsoft Azure Training in Chennai
  • GCP Training in Chennai

Copyright 2022 CREDO SYSTEMZ | All Rights Reserved.