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.
In the previous post, I explained how to use comments. Now, in this article, I will discuss Python variables.
What Are Python Variables?
In maths, we say a variable is a reference point where we actually store a number for doing some operation. Similarly, in a programming language, a variable is a container (storage area) to hold data. For example,
pyhog = 10
Here, pyhog is a variable storing the value 10.
We assign those values using the assignment operator =.
So, any value we can assign.
Assigning Values to Variables in Python
As we can see from the above example, we use the assignment operator = to assign a value to a variable.
Another example where we are storing normal words:
blog = 'dev.to'
print(blog)
# Output: dev.to
Here, we assigned a value inside '' and we print that value using that variable name.
Python is a type-inferred language, so you don't have to explicitly define the variable type. It automatically knows that dev.to is a string and declares the blog variable as a string.
Changing Variable Value
We can actually update the value accordingly.
blog = 'dev.to'
print(blog)
# Output: dev.to
blog = 3
print(blog)
# Output: 3
As Python handles variables dynamically, it allows us to update an int with a string variable holder.
Rules for Naming Variables
There are a few rules which all developers should follow to have some structured code instead of random words.
Each variable should have its meaning.
For example, if I want to store the score of a team, we will use score but not count.
There are many things we actually define.
Other than these meaningful variable naming conventions, we have these rules:
- Constant and variable names should have a combination of letters in lowercase (a to z) or uppercase (A to Z), digits (0 to 9), or an underscore (_).
snake_case
MACRO_CASE
camelCase
CapWords
Create a name that makes sense. For example,
scoremakes more sense thani.If you want to create a variable name having two words, use an underscore to separate them.
my_name
current_salary
- Python is case-sensitive. So,
numandNumare different variables. For example,
var score = 3
var Sum = 90
print(num) # 3
print(Num) # 90
- Avoid using keywords like
if,True,class, etc. as variable names.
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:
HexmosTech
/
LiveReview
Blast-Radius Aware AI Code Review for Business-Critical Systems
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.
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:





Top comments (0)