Python Data Types

 Before we go into the "coding" part, Let's first see what are all different types of Data types in python.



Data Types

  • Numeric
    • Integers
    • Float
    • Complex Numbers
  • Dictionary
  • Boolean
  • Set
  • Sequence type
    • Strings
    • List
    • Tuple

Numeric

a,b,c=10,15.65,5j+2 print(type(a)) class 'int' print(type(b))
class 'float' print(type(c))
class 'complex'

Sequence Type


 name="ket"  
 cart=["pen",10,"hd"]  
 product=("egg","milk","chicken🐔")  
print(type(name)) <class 'str'> print(type(cart))
<class 'list'> print(type(product))
<class 'tuple'>

Well, this is a basic look of Strings, Lists, Tuples, Integer, Float, Complex Numbers.
we will see more about Dictionary, Boolean, And Set in the next post.
Previous                                                                                                                                  Next

Comments

Popular posts from this blog

Prime numbers with Python

Python Data Types Boolean

Python Installation