WEBVTT

00:00.380 --> 00:07.640
When you're writing long numbers, you can group digits using underscores to make large numbers more

00:07.640 --> 00:08.420
readable.

00:08.570 --> 00:18.110
So for example, this let's make my value 14 000000000.

00:18.830 --> 00:19.390
That's it.

00:19.400 --> 00:23.540
So when you print a number that was defined using underscores.

00:23.750 --> 00:26.630
Python prints only the digits.

00:26.630 --> 00:30.500
So Python ignores the underscores when storing these kinds of values.

00:30.620 --> 00:33.080
Even if you don't group them.

00:33.200 --> 00:38.630
Digits in threes so the value will still be unaffected.

00:38.630 --> 00:42.200
So the two python 1000.

00:43.100 --> 00:45.240
1000 year.

00:47.710 --> 00:52.150
Is the same as one underscore three zeros.

00:53.760 --> 00:59.250
Which is the same as one zero underscore two zeros.

00:59.910 --> 01:04.710
This feature works for both integer and floats.

01:04.830 --> 01:11.970
We can also multiple assignment here so you can assign values to more than one variable using just a

01:11.970 --> 01:13.380
single line of code.

01:13.410 --> 01:19.830
So this can help shorten your programs and make the make them easier to read.

01:19.860 --> 01:23.400
So you will use this technique most often when initializing.

01:24.740 --> 01:26.330
Numbers, For example.

01:26.330 --> 01:27.530
Here.

01:28.220 --> 01:29.030
Here.

01:30.570 --> 01:35.970
You can initialize the variables X or a B.

01:36.870 --> 01:40.800
T2000.

01:41.810 --> 01:46.610
So we need to separate the variable names with commas.

01:47.380 --> 01:48.520
Here like this.

01:51.120 --> 01:59.530
It's a separate variable names with commas here and do the same with the values here.

01:59.660 --> 02:00.890
These are the variables.

02:00.890 --> 02:03.680
Remember every time variables.

02:04.450 --> 02:08.470
And these are the values.

02:12.000 --> 02:15.200
So this is my value is variables.

02:16.420 --> 02:16.690
Um.

02:17.320 --> 02:17.970
Yes.

02:17.980 --> 02:18.340
Variable.

02:18.340 --> 02:18.900
So we will.

02:22.140 --> 02:22.890
So.

02:24.390 --> 02:30.540
As long as the number of values matches the number of variables, Python will match them correctly.

02:30.540 --> 02:33.780
Here we have three numbers and three variables.

02:34.830 --> 02:36.240
One, two, three.

02:36.450 --> 02:38.210
One, two, three.

02:38.220 --> 02:38.910
Variable.

02:39.610 --> 02:41.500
And that's it.

02:42.410 --> 02:43.280
They are this out.

02:46.280 --> 02:47.030
So.

02:50.220 --> 02:50.640
We have.

02:50.730 --> 02:52.500
We also have constants in.

02:53.770 --> 02:54.240
Python.

02:54.250 --> 03:02.740
So a constant is a variable whose value stays the same throughout life of a program.

03:02.740 --> 03:05.140
So actually, let me write that constants here.

03:05.140 --> 03:07.330
So let's define that.

03:07.600 --> 03:08.440
So.

03:11.980 --> 03:12.510
Owens.

03:15.590 --> 03:21.770
So constant is basically like you are locking the your variable name.

03:22.010 --> 03:24.650
Let's throw a log log here.

03:38.010 --> 03:41.730
With constant you are locking your.

03:43.460 --> 03:45.140
Variable value.

03:45.170 --> 03:46.550
So here.

03:48.990 --> 03:57.090
A python doesn't have built in constant types, but Python programs use all capital letters to indicate

03:57.090 --> 04:02.160
a variable will be treated as constant and never be changed.

04:02.190 --> 04:09.990
Here we can do, for example, max connections and 5000 here.

04:10.020 --> 04:15.600
So when you want to treat a variable as a constant in your code, write the name of the variable in

04:15.600 --> 04:17.670
all capital letters.

04:19.270 --> 04:22.990
We also have a comment in Python.

04:24.240 --> 04:26.460
Which you will learn in next lecture.
