Python Data Type

What is Python Data Type

Python Data Type : variable  में हम जब भी कोई data store करते हैं तो उसका एक type होता है, python में कई तरह के data type होते हैं जैसे : numeric, sequence, set, etc.  लिए इनके बारे में अच्छे से समझते हैं।

आसान भाषा मे कहे तो data type हमे बताता है की variable मे हम कैसी information को store कर रहे है क्या वो number है, text है या कुछ और।

Data Types in Python

python मे अलग अलग types के information को store करने के लिए अलग अलग types के data type होते है। जैसे : – 

Numeric Data Type

Numeric data type numbers को represent करता है जैसे: 1, -1, 1.5 जितने भी numbers होते हैं इन्हें numeric data type कहा जाता है। 

python में numeric data type तीन तरह के होते हैं. Integers, floating-point numbers, complex numbers. 

  • integers वह सभी numbers होते हैं जो बिना decimal point के होते हैं, यह positive, negative या zero हो सकते हैं जैसे : 1, -4, 0.
  • Floating point numbers वह numbers होते हैं जो decimal point के साथ होते हैं, जैसे : 3.15, – 1.2, 0.0 etc.
  • Complex numbers वह numbers होते हैं जो real और imaginary port को combine करते हैं,  जैसे : 1+3j, 2-5j, etc.

Sequence Data Type

Sequence data type, text  represent करता है जैसे: string, list, tuple इनके बारे में अब आगे अच्छे से समझेंगे। 

Single and double quote के अंदर हम कुछ लिखते हैं तो यह string कहलाता है। 

Triple quote के अंदर हम कुछ लिखते हैं तो भी यह string कहलाता है इसका use हम multi line string के लिए करते हैं।

Mapping Data Type

Mapping type जैसे की dict यह key value pairs का unordered collection होता है, इसके uses को आगे समझेंगे। 

Set Data Type

Set type, set unique items का unordered collection होता है आपने math में set तो पढ़ा ही होगा कुछ इसी type का यह भी होता है इसके बारे में अब आगे समझेंगे। 

Boolean Data Type

Boolean type, true ओर false को represent करता है।

None Data Type

None type हम जब भी कोई variable बनाते हैं और अगर उसमें कोई value ना दे तो उसमें एक rough value आ जाती है, but हम चाहते इसमें कोई value ना हो तो इसमें none को assign कर देते हैं। 

What is Casting Function

किसी data के data type को किसी और data type में convert करने के लिए इस method का use करते हैं

Int :  जब हम किसी value को integer में convert करते हैं तो ‘int’ का use करते हैं। 

Float :  जब हम किसी value को floating point number में convert करते हैं तो ‘float’ का use करते हैं

Complex : जब हम किसी value को complex number में convert करते हैं तो ‘complex’ का use करते हैं.

String : जब हम किसी value को string में convert करते हैं तो ‘str’ का use करते हैं

उम्मीद करते है कि आपको python data type अच्छे समझ मे आ गया होगा । अपने learning को continue रखने के लिए next button पर click करे,

Add a comment...

  • All Posts
  • Artificial Intelligence
  • Computer Fundamentals
  • Computer Networks
  • Data Analytics
  • Data Science
  • DBMS
  • Deep Learning
  • Digital Electronics
  • DSA with Python
  • Excel
  • Exercise
  • Git & Github
  • Machine Learning
  • Matplotlib
  • Natural Language Processing
  • NumPy
  • Operating System
  • Pandas-s
  • Power BI
  • Python Tutorial
  • Scikit-learn
  • Seaborn
  • SQL & MySQL
computer networks

Table of Contents All Chapters 1. OSI Model      1.1. Physical Layer      1.2. Data Link Layer  ...

computer networks

Table of Contents All Chapters 1. Topology 2. Types of Topology      2.1. Point to Point Topology    ...

computer networks

Table of Contents All Chapters 1. Data Communication 2. Types of Data Communication      2.1. Simplex      2.2....

digital electronics number system

Table of Contents All Chapters 1. Logic Gate 2. AND Gate      2.1. AND Gate Truth Table 3. OR...

Edit Template

Sign up to track your learning

Login to continue your learning tracking

To reset your password, please enter your email address or username below.

Scroll to Top