DEV Community

Cover image for Understanding Data Types in Python
Ganesh Kumar
Ganesh Kumar

Posted on

Understanding Data Types in Python

Hello, I'm Ganesh Kumar, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. Star us to help devs discover the project, give it a try, and share your feedback to help improve the product.

Previously, we understood how expressions work.

Now, we will understand how these values are decided and how Python interprets them.

How Are Expressions Evaluated?

All expressions are combinations of values and operators. These expressions are evaluated to a single value.

Each of these values belongs to a data type.

2, 3, 0, and -1 belong to int(), whereas 29.2 and -12.2 belong to float(). Finally, jk and "lm" are text and belong to string().

Understanding these three data types will help us start writing code.

Integer Data Type

It includes all non-decimal and non-complex numbers from -∞ to +∞.

For example:

  • -10 is an int
  • 20 is an int

Even 0 is also an int.

Float Data Type

It includes all decimal and non-complex numbers from -∞ to +∞.

For example:

  • -10.12 is a float
  • 2.32 is a float

String Data Type

It includes any values that are written inside '' or "".

For example:

"hello"
"b"
's'
Enter fullscreen mode Exit fullscreen mode

Wrapping Up

We understood how values are classified by Python.

Let's do some value manipulation with the string data type.

I'm building LiveReview, a blast-radius aware AI code review built for your business-critical systems.

Instead of presenting every diff with equal emphasis, LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.

Spend code review effort where business risk is highest — not spread evenly across every diff.

⭐ Star it on GitHub:

GitHub logo HexmosTech / LiveReview

Blast-Radius Aware AI Code Review for Business-Critical Systems

LiveReview

gitleaks.yml osv-scanner.yml govulncheck.yml semgrep.yml dependabot-enabled mcp-testcases.yml

LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems

LiveReview is an AI code reviewer that scores every hunk of a diff by blast radius: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.

blast-radius-demo.mp4

LiveReview's Blast Radius & Review Priority scoring, live in the diff viewer.
















The exact math, not a black box Visualize blast radius at a glance Every factor that feeds the score

How does Blast Radius scoring work? (a more technical explanation)

Here's the goal:

  • A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.
  • A 300-line UI change in one file, fully covered by…




Click below to try LiveReview with your codebase:

LiveReview Banner

Top comments (0)