filmov
tv
Python Tutorial for Beginners 4 - Python Variables and Types
Показать описание
In this Python Tutorial for Beginners Video I am going to show How to use Python Variables and Types. I will show How to declare variable, How to use Variable, How to Type cast variables In Python.
So what is a Variable ? A variable is a named place in the memory where a we can store data and later retrieve the data using the variable “name”. we get to choose the names of the variables. Also we can change the contents of a variable in a later statement.
As we discussed Python Introduction Video, that Python is completely object oriented and not "statically typed" i.e. Python is dynamically typed language. So we do not need to declare
variables before using them . In addition we don't need to declare the variable type type. Every variable in Python is an object.
Python Variable Name Rules
Variable Must start with a letter or underscore _
Variable Must consist of letters and numbers and underscores
Variable are Case Sensitive
Good: name age tom25 _max
Bad: 45name #name age.22
Different: name Name NAME
Reserved Words
It is not allowed to use reserved words as variable names / identifiers
and del for is raise
assert elif from lambda return
break else global not try
class except if or while
continue exec import pass yield
def finally in print
#PythonTutorialforBeginners #ProgrammingKnowledge #LearnPython #PythonCourse
★★★Top Online Courses From ProgrammingKnowledge ★★★
★★★ Online Courses to learn ★★★
★★★ Follow ★★★
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
So what is a Variable ? A variable is a named place in the memory where a we can store data and later retrieve the data using the variable “name”. we get to choose the names of the variables. Also we can change the contents of a variable in a later statement.
As we discussed Python Introduction Video, that Python is completely object oriented and not "statically typed" i.e. Python is dynamically typed language. So we do not need to declare
variables before using them . In addition we don't need to declare the variable type type. Every variable in Python is an object.
Python Variable Name Rules
Variable Must start with a letter or underscore _
Variable Must consist of letters and numbers and underscores
Variable are Case Sensitive
Good: name age tom25 _max
Bad: 45name #name age.22
Different: name Name NAME
Reserved Words
It is not allowed to use reserved words as variable names / identifiers
and del for is raise
assert elif from lambda return
break else global not try
class except if or while
continue exec import pass yield
def finally in print
#PythonTutorialforBeginners #ProgrammingKnowledge #LearnPython #PythonCourse
★★★Top Online Courses From ProgrammingKnowledge ★★★
★★★ Online Courses to learn ★★★
★★★ Follow ★★★
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Комментарии