Coding in Python 04 – Setting up Variables

In video 4, variables are introduced.

YouTube player

Creating a variable containing a string

my_var = "Hello World"

Creating a variable containing an integer

my_var = 2

Print the type of a variable


Concatenating string variables

my_var_1 = "learn "
my_var_2 = "python"
print(my_var_1 + my_var_2)

Adding integer variables

var1 = 10
var2 = 56
var1 + var2

Brand-New Course!

Check out Jay’s new course on Ansible and start automating today!

Discount Vouchers

Receive 5% off an LPI exam voucher!

Exclusive Member Features

Support the channel and receive exclusive perks!