Variables in python

Spread To Friends

Today we are going to discuss about variable and data types in Python language

 

In the previous tutorial we discussed about the usability and advanced functionalities of python and why big companies consider to make programs in Python .

if you did not access the tutorial then click here and see the tutorial first so that you can understand this tutorial easily. without any further delay let’s get started in this tutorial.

 

So what are variables ?

 

Variables are nothing but containers where we can store values for the limited time and can be for permanent with a specific data type this is the inexact definition of variables. Variables can be defined in a programming language by just defining any word with specific data type developers consider to make meaningful variables based on the allocated task to the variables for easy finding purpose.

 

Generally while declaring a variable you need also to declare the datatype of the variable but in Python you don’t need to declare the data type of the variable it doesn’t mean that in Python there are no data types it’s not that right at all there are data types in Python but you don’t need to declare that . Python automatically identifies the data type of your variable you declared before , so that there is no need to declare the data type but you can change the data type in Python in which you are willing to convert.

The data type word comes too much time right ?

 

If you are confused about data types then don’t worry I will clarify that for you now that we will discuss about what data types are in programming languages.

Generally in programming languages there are many types of data types. Some of them are int, str, double long etc . But in terms of the main data types of any programming language there are int str char float bool etc. The data types are basically used to clarify the type of any variable data used in programming languages . There are many kinds of data types because each data type consumes memory for their allocated memory size. In some cases it can be  high and in some low it is different because of their work functionality. In Python variables can be declared as mentioned below :

 

  a = “hello”    (string)

  b  = 2      (int)

  c = 10.5        (float)

  d  = True       (bool)

  e  = “c”          (char)

 

I used to make quotes in Visual Studio code. An open source fully-fledged IDE from Microsoft. If you want to download Visual Studio code then follow the link below. Now the code to declare a variable is mentioned below.

 

There are many data types in Python three types are :

  1. Str 
  2. Int 
  3. float 
  4. complex 
  5. list 
  6. tuple 
  7. range 
  8. dict 
  9. set 
  10. frozenset 
  11. bool 
  12. bytes 
  13. bytearray 
  14. memoryview 

Etc…

You can use all the data types in Python language. We will see each of them in detail in another tutorial, in upcoming tutorials.

That’s all for now see you in the next tutorial until then stay tune with me and don’t forget to get signed up.

 

Thank you,

 

From: Sayantan Biswas

close
Oval@3x 2

Don’t miss these updates!

We don’t spam! Read our privacy policy for more info.


Spread To Friends

9 thoughts on “Variables in python

    • February 2, 2021 at 6:37 pm
      Permalink

      more posts like this are coming soon, for now you can check out other posts.

      Reply
  • February 4, 2021 at 11:09 pm
    Permalink

    Wow, amazing blog layout! How long have you been blogging for?
    you made blogging look easy. The overall look of your web site is excellent,as well as the content.

    Reply
  • February 4, 2021 at 11:14 pm
    Permalink

    Hello There. I found your blog using google. Thiis is an extemely well
    written article. I’ll mazke sure to bookmark it aand return to read more of your useful information. Thanks for the post.
    I’ll certainly return.

    Reply
  • February 4, 2021 at 11:15 pm
    Permalink

    Fabulous, what a web site it is! This web site provides useful data to us, keep it up.

    Reply
  • February 4, 2021 at 11:17 pm
    Permalink

    Nice post. I waas checking continuously this blog and I’m impressed!

    Very useful information specially thee lqst part :
    ) I care ffor such info a lot. I was looking for this particular information for
    a long time. Thank you and best of luck.

    Reply
  • February 4, 2021 at 11:25 pm
    Permalink

    Igot this site from myy pal who shared wkth me concerning this website and now this time I am
    browsing this website and reading very informative articles or reviews at this place.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *