Tech Mahindra interview questions

Soumendra's Blog
2 min readDec 18, 2021

Python interview questions in Tech Mahindra

This is a part of my job interviews series. This post is originally posted at https://blog.soumendrak.com/tech-mahindra-interview-questions

Background

  • Years of Experience: 4 years
  • Relevant Python experience: 1.5 years
  • Year: February 2016
  • Campus: Dairy circle, Bengaluru (now closed permanently)
  • Position: Python developer
  • Company: Tech Mahindra

Interview discussions

I have mentioned the main questions and the ladder questions around that question under it.

First round

  1. What is Class?
  • Entities of an application under development is called objects.
  • In Python, every entity is an object.
  • Class defines objects.
  • Method defines the behaviour of the class.

2. What is inheritance?

  • Inheritance is the property of OOP where
  • A class extends/inherits the methods and properties of another base class
  • It maintains the hierarchy
  • Increases reusability

3. Regex to find an IP address

4. Difference between extend and append?

5. What is Abstract class?

  • Which keeps the underlying complexities of the class away from class

6. What is dictionary comprehension

  • Like list comprehension for Dictionaries

7. What is a constructor?

  • Which constructs something
  • The __init__ in a class

8. What is a Generator?

  • It generates in the runtime on every loop call

9. Difference between range and xrange?

range is a list

xrange is a generator

xrange is range in Python 3

Second round onward

Did not qualify. I was weak in the OOPs concepts.

Verdict

Rejected

Analysis

  • I was not fully prepared, as it was near to my Accenture office I went.
  • This was my first Python interview. I want to check how in the market Python questions are being asked.
  • I got to know I have a lot to study. I was self-studying Python.

I have appeared in 20+ interviews so far. You can check out my job interview series for the rest of the interviews experiences.

Let me know if you have any further questions. Thank You.

--

--

Soumendra's Blog

Senior development engineer at IBM India. Aspiring Solution Architect. Views are personal and not represent my organization.