Python Variables & Constants Explained Simply (For Beginners) (Python Tutorial #4)
Jun 20, 2025
Welcome to Part 1 of the Python Fundamentals series! 🎉
In this video, we’ll break down two of the most essential concepts in Python — variables and constants — in the simplest way possible.
Whether you're a complete beginner or just brushing up your basics, this video will help you understand:
✅ What variables are
✅ How to assign and update values
✅ What constants are (and why we use ALL CAPS for them)
✅ Real-life examples to make it all stick!
Python doesn’t have to be scary. Let’s learn it together — one concept at a time.
📌 Next video: We’ll talk about how Python reads your code line by line and what comments are (spoiler: they’re lifesavers!).
🔗 Useful Links:
â–¶ Download Python: https://www.python.org/downloads
Show More Show Less View Video Transcript
0:00
hey guys welcome back to this channel if
0:02
you're new then welcome to this channel
0:03
well I'm back with one more interesting
0:06
video and today we are going to talk
0:07
about Python fundamentals these are
0:10
really important because fundamentals
0:12
will act as building blocks and will be
0:14
a strong base for your coding so let's
0:18
start with these fundamentals
0:20
so we are going to learn about variables
0:22
in Python constants in Python sentences
0:25
or lines and even comments in Python
0:30
so yeah let's start with variables in
0:32
Python all right let's start with
0:34
something super important which is
0:37
variables so think of variables like
0:39
storage boxes yeah like the ones you use
0:43
at home you can label the box and throw
0:45
anything inside if you want to change
0:47
what's inside later you can do that no
0:50
problem in Python variables work exactly
0:53
like that they are just the names we
0:56
give to the values so we can reuse them
0:59
in our code like for example if you open
1:02
your editor coding editor and for
1:05
example I'm creating a new file called
1:07
variable dot py
1:12
and here I'm going to create a variable
1:14
called snack so
1:17
and I am adding chocolate in this and
1:22
when you print the snack
1:26
what happens what can be the output i
1:29
want you to pause at this particular
1:31
point and please comment down the output
1:34
don't worry I'm going to go through it
1:35
i'm going to see it if you still have
1:37
any doubts you can just pause at the
1:40
moment and you can just still add your
1:42
comment and I'm going to go there and
1:44
check
1:47
so when you run this I'm using this run
1:52
python button and it will give you the
1:55
chocolate you can do something like you
1:56
can go to the command prompt and you can
1:59
still do the same thing as you know we
2:01
have discussed this before
2:05
so you just have to say variable py and
2:07
it will still work for you so you're
2:10
printing the snack not the exact
2:12
chocolate that's the difference
2:16
so what you're doing here you are just
2:19
creating a variable called snack and you
2:21
told Python it holds the word chocolate
2:26
and when you print it Python gives you
2:28
back the chocolate easy right and now
2:31
here is the cool part variables can
2:33
change some like for example you don't
2:35
like chocolate and you like chips maybe
2:39
and you can just add chips here and when
2:42
you run the code and you will see chips
2:44
as output this time
2:49
so if you suddenly want to turn the
2:52
chocolate into chips you can do that and
2:55
Python is like okay boss update i
2:58
updated chocolate to chips cool right so
3:02
this is all about what exactly a
3:05
variable a variable is something like a
3:07
label to the box that you give like for
3:10
example there is a box named snack and
3:14
you kept inside the chocolate in like
3:18
I'm sorry you kept chocolate inside the
3:21
box named snacks and whenever you want
3:24
snacks whenever you want chocolate you
3:26
will just ask you will just use the word
3:30
snack and you will get your chocolate
3:32
and the good thing is you can change the
3:35
chocolate to chips or any other snack
3:37
that you like and you can just you know
3:39
change the value here and it will
3:41
reflect immediately when you print the
3:44
name snack
3:47
i hope you understood what exactly is a
3:49
variable and one more thing is we use
3:52
variables in multiple times in multiple
3:55
ways in whenever you are declaring a co
3:58
code or whenever you want to add numbers
4:01
and whenever you want to save someone's
4:04
name so variable plays really a very
4:08
important role when dealing with the
4:10
huge operations in the upcoming chapters
4:13
you will understand how we use variable
4:16
and one more important thing is you have
4:18
to give a meaningful name whenever you
4:21
are creating a variable like for example
4:24
when you're uh storing customers name
4:27
you can keep customer name whenever you
4:31
are giving customer's age I would say
4:33
customer's age so you have to give a
4:36
meaningful name in such a way that
4:39
variable itself will define its value
4:41
like okay this particular variable is
4:45
holding a snack item this particular uh
4:47
this particular variable is holding a
4:50
person's name a person's age a person's
4:52
date of birth something like that so
4:55
variable is really important always try
4:57
to keep in mind that give a useful
5:00
meaningful name that you can understand
5:02
and you can work on it as easy as
5:04
possible
5:09
so giving a meaningful name also helps
5:12
the developers like for example if two
5:15
members are working and I kept a
5:17
variable name as a a equal to 100 and
5:20
now the other de developer will come and
5:23
see and he'll be like he or she'll be
5:26
like what exactly is a what it is
5:28
holding what it's meaning what does it
5:31
mean so that's how they feel whenever
5:35
they see or go through your code
5:39
so that's the value of giving a
5:41
meaningful name
5:43
so in Python how do you declare a
5:45
variable in Python you can declare a
5:48
variable by assigning a value to a
5:50
chosen name and you do not need to
5:52
explicitly uh give any data type so in
5:55
Python that's how you will declare a
5:58
variable by just giving a value to the
6:01
name that you have given so you don't
6:04
have to give any uh data type before
6:07
assigning the value and because Python
6:10
will understand it all as I said before
6:13
so this is how Python will actually
6:16
determine the variable and it will
6:18
understand the type of the variable okay
6:20
now let's talk about constants in Python
6:23
these are values that you don't want to
6:25
change python doesn't have any strict
6:29
rule for constants like some other
6:31
languages because by the convention we
6:34
write constants in all caps to remind
6:37
ourselves like hey don't mess with this
6:39
like for example
6:41
uh I think you're getting my point
6:43
constant is actually a value that you
6:45
cannot change that you can never change
6:48
like for example in maths we have a
6:51
value called pi right the value of pi is
6:54
3.14
6:56
and you cannot change that value because
6:58
it is already there and it is already
7:00
determined and you can never change the
7:03
value of pi so we can say that as a
7:06
constant so like that we have many
7:08
constants in science and maths
7:14
so whenever you are dealing with the
7:16
constants whenever you want to uh give a
7:18
value that can never be changed either
7:21
by you or any other developer out there
7:24
so at the time you can give something
7:26
like constants
7:29
so you don't uh use any keyword as I
7:32
said before for before giving any um
7:35
data type like here
7:38
constant
7:40
integer
7:42
equal to or maybe constant
7:47
pi = 3.14
7:50
you don't have to give that you don't
7:52
have to do that because Python will
7:55
actually understand that it's already a
7:57
constant you don't have to explicitly
8:00
you don't have to call by yourself you
8:02
just have to give it like this now
8:04
Python will understand okay this is a
8:06
constant because we are writing
8:09
constants in capital letters caps okay
8:13
so whenever you're giving a variable in
8:16
caps then Python will understand by
8:18
itself that it is a constant
8:21
okay so this is how the constant will be
8:26
and you will never change the value of a
8:28
constant whenever you are giving any
8:30
value in capitals even the person who is
8:34
working with you will understand that
8:36
okay this can never be changed because
8:39
this is a constant so that's the
8:41
difference between variable and constant
8:44
the value of variable can be changed any
8:46
time at any case but constant you can
8:49
never change that
8:56
but the concept of constant is actually
8:58
for ourself to understand for us because
9:01
we are telling ourselves and anyone else
9:03
who reads that particular code
9:07
that this value shouldn't be changed
9:09
technically Python will still let you
9:11
change the value of pi but that would be
9:14
like breaking your own rule right trust
9:16
me the future in the future you'll be
9:20
really annoyed like what's going on here
9:22
you can still change it
9:25
but it's for us the concept itself is
9:28
for us
9:29
i hope you guys will remember variables
9:32
are changeable boxes like age and
9:35
constants are fixed values like max uses
9:39
100
9:41
so here are some of the examples of
9:44
numerical constants that you can still
9:46
you know understand like
9:50
can be represented either in floating
9:52
point or even you know in integer
9:55
integer float
10:01
and here you see
10:04
text constants are represented using
10:07
single quotes
10:10
and double quotes there is not much
10:13
difference but you can still see but you
10:16
just have to tell your developer tell
10:18
your team that it's a constant
10:24
there is no change in the difference
10:26
it's a variable still but it can be a
10:29
constant
10:35
and there you go that's how variables
10:37
and constants work in Python it's super
10:40
simple right you'll be using them all
10:41
the time as you start building your own
10:44
programs and if this made sense so far
10:47
give this video a quick like and because
10:49
it helps a lot and hey if you're still
10:53
just getting started with Python hit
10:54
that subscribe button so you don't miss
10:56
the next parts where you go deeper in
10:59
Python basics think you're ready for the
11:02
next one right let's roll then see you
11:04
in the next one

