Python for Entrepreneurs Transcripts
Chapter: Appendix: Python language concepts
Lecture: Concept: Variables
Login or
purchase this course
to watch this video and the rest of the course contents.
0:02
Variables are the heart of all programming languages. And variables in Python are no nonsense.
0:09
Let's look at the top one, I am declaring a name variable and assigning it the value of Michael, and age variable and assigning it the variable of 42.
0:17
Some languages you have to put type descriptors in the front like you might say string name, integer age,
0:23
you might put semicolons at the end, things like that. None of that happens in Python, it's about as simple as it possibly can be.
0:29
So we can declare them and assign them to constant values, we can increment their value in this case of the birthday
0:36
and we can assign them to complex values like the hobby, which is really the list or array of strings, the hobbies that we have.
0:43
So we assign these on creation, and we can even take the return values of functions and assign them to these variables, like so.