Skip to content

Python Journey

My Coding Blog

Menu
  • Links
Menu

Basic Data Types in Python

Posted on August 23, 2022 by coden00b

There are few data types in Python namely:

  • integers (int) – numeric type, whole numbers (can be positive or negative), e.g. 1,2,3
  • floating (float) – numeric type,numbers with decimal point, e.g. 1.1, 2.20, 3.450
  • complex (complex) – numeric type, real + imaginary,e.g. 5+6q
  • strings (str) – text type, sequences of characters,e.g. “Euan”, “1234”
  • dictionaries (dict) – is a mapping type, unordered key:valued pairs
  • lists (list) -sequence type,ordered sequence of objects,e.g.[123,”Euan”,100.0]
  • sets (set) -set type, unordered collection of objects {“x”,”y”}
  • booleans (bool)- logical value, either True or False
  • tuples (tup), ordered,unchangeable or immutable sequence of objects
There are few more data types which I won’t cover for now. See you next post.

Leave a Reply Cancel reply

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

Recent Posts

  • The Zen of Python
  • Python>>String Interpolation and Formatting
  • Python>>String Methods
  • Python>>String Concatenation
  • Python>>Strings: Indexing and Slicing

Recent Comments

No comments to show.

Archives

  • January 2023
  • August 2022

Categories

  • Blog
  • Data Types