Python Trainee

Python Trainee Interview Questions and Answers

Updated 4 Jan 2025

Q1. Difference between list vs tupple vs dictionary

Ans.

List is mutable, tuple is immutable, dictionary is key-value pair

  • List is enclosed in square brackets [], tuple in parentheses (), dictionary in curly braces {}

  • List and tuple can store multiple values of any data type, dictionary stores key-value pairs

  • List and dictionary are mutable, tuple is immutable

  • List and tuple maintain order, dictionary does not

  • List allows duplicate values, tuple and dictionary do not

Q2. What are dataframe in python

Ans.

Dataframe is a 2-dimensional labeled data structure with columns of potentially different types.

  • Dataframe is a table-like data structure in Python

  • It is used for data manipulation and analysis

  • It can be created using various sources like CSV, Excel, SQL, etc.

  • It is a part of the pandas library in Python

  • Example: df = pd.read_csv('data.csv') creates a dataframe from a CSV file

Python Trainee Interview Questions and Answers for Freshers

illustration image

Q3. Char count in a string?

Ans.

Use Python's built-in len() function to count characters in a string.

  • Use len() function to get the length of the string.

  • Consider spaces and special characters in the count.

  • Example: s = 'Hello World', char_count = len(s) = 11.

Python Trainee Jobs

0
Are these interview questions helpful?
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Python Trainee Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter