Thursday, 12 April 2018

Basic python value and type

Value & Type

A value is one of the basic things a program works with like letter and number.

The value belongs to a different type: integer and string.

you can identify a string, integer, and float using below command.

>>> type('hello')
<class 'str'>

>>> type(3)
<class 'int'>

>>> type(3.0000)
<class 'float'>

Note: if you quotation mark its output will sting value even float value.

>>> type('3.2')
<class 'str'>

Large integer use comma between number we cannot expect value because it is a legal integer

>>> print(1,000,000)
1 0 0






No comments:

Post a Comment

Configure EKS Persistent Static Storage With Elastic File System Using Terraform

  checkout :https://youtu.be/QuUIgQWBBZM