Skip to main content

Variable Declaration in Python

                                 Variables

Variables is a container which stores the values in it. Every values in Python has a datatype. Datatypes in Python are numbers, list, tuple, strings, dictionary etc.



Rules for Python Variables

  • A Variable name can contain alpha-numeric characters and underscores (A - Z , a - z, _).
  • A Variable name can start with number or underscore character, but can' t start with a number.
  • Variable name should not be keywords. Keywords are some specific names that are used in Python for some specific function.
  • Variable names in Python are case sensitive. (Height, height, HEIGHT are different).


Variable Declaration


Here we didn't defined data type , as we know Python is dynamically typed so not required to define explicitly.

    Multiple Variable Declaration

        

We can declare multiple variables in a single statements. And you can initialize multiple variables with
the same value.  




Learn Data Science Material which helps to learn concepts in Python, Statistics , Data Visualization, Machine Learning , Deep Learning. And it contains Projects helps to understand the flow of building model , and what are the necessary steps should be taken depending on the data set. Interview Questions helps to crack the interview. 





Learn Python from basics to advanced. 



Join ML in python channel in telegram , Where you can learn every concepts in Python, Statistics, Data Visualization, Machine Learning, Deep Learning.

  

Join Aptitude Preparation channel in telegram , this channel helps to crack any interview.

Comments