Python

Data types in Python


Data type specifies the type of data present inside a variable.
• Every value has a data type
• In python it is not required to specify the data type explicitly.
• Based on the value, the type will be assigned automatically.
• Python is dynamically typed language.


Python contains the following data types

• None
• Numeric
• List
• Tuple
• Set
• String
• Range
• Dictionary/ mapping
NONE:
• If a variable is not assigned with any value is called None.
Numeric
• Numeric type of data is classified into four types

  1. Int
  2. Float
  3. Complex
  4. Bool
    Integer
    Integer includes the values that are integers.
    Integer type variables stores the values that are in integer format.
    • Example:
    num= 4
    print(num)
    output :4
    Float:
    • Float includes decimal numbers.
    Example
    • num= 5.5
    print(num)
    output:
    5.5
    Complex:

    • It includes real and imaginary values.
    • Example:>>num=7+8j
    num= ‘7+8j’
    print(num)
    output:
    7+8j
    Note: In all the above data types we are not specifying the data type before the variable. This means that in python thee is no need to type the data type explicitly. It considers the type of the data based in the given input value

Lakshmi Durga

Share
Published by
Lakshmi Durga

Recent Posts

Samsung TV Red Light Blinking? 4 Fixes (2026 Power Logic Hub)

User Problem Scenario: The Red Light "Panic" You press the power button on your Samsung…

5 days ago

Samsung TV Not Connecting to WiFi: 2026 Easy Fix Guide

Introduction: I Know the Feeling "We’ve all been there. You sit down to watch your…

6 days ago

Samsung TV Restarting During Diagnosis? Fix the Reboot Loop Fast

User Problem Scenario: The "Diagnosis Loop" Paradox Imagine you notice your apps are slow. You…

6 days ago

Samsung TV Optimize Now Not Working? (2026 Fix: Greyed Out, Stuck or Not Responding)

🎓 Technical Module: Memory Maintenance Logic Module: WV-OS-307 Verified 2026 👨‍🏫 Instructor: Vangari Divya (M.Tech)…

1 week ago

Samsung Smart Hub Test Failed? (2026 Fix: DNS, ISP Block & Authentication Error)

 Introduction: The Setup Paradox "There is a specific moment of frustration for every Samsung Smart…

2 weeks ago

Samsung TV Picture Test Not Working? 4 Technical Recovery Fixes

Introduction: Lab Diary & Experience "When your Samsung TV screen begins to flicker or show…

2 weeks ago