PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Python · Theory

Data Types in Python

← All stacks

Theory

14/268

Data Types in Python

Data types say what kind of value you have. Scalars you meet daily: int, float, bool, str. Collections: list, tuple, set, dict. None has type NoneType. type(x) prints the type. Everything is an object — even 5 and print.

Pick the right box. Marks as int or float. A name as str. A row of names as list. A labelled record as dict. Using a list when you needed a dict makes lookup painful. Viva: name four scalars and four collections separately.

Data Types in Python — output — <class 'int'> 40, then float 1999.5, then bool True.

Exam tip

Scalar types and collection types separately.

Example

# Data types
seats = 40
fee = 1999.5
open_ = True
print(type(seats), seats)
print(type(fee), fee)
print(type(open_), open_)

Data Types in Python — output: <class 'int'> 40, then float 1999.5, then bool True.

Short notes

  • Defint float bool str + collections.
  • Ruletype(x) to check.
  • Rememberlist tuple set dict.

Questions

1

Explain Data Types as if you are teaching a junior — definition, then one tiny script.

2

What does the example print, and why?

3

What mistake do freshers make with Data Types?

Previous← Python VariablesNextPython Numbers →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.