Python Data Types || data types in python, data types in python in hindi

Home ๐Ÿ‘‰ O level ๐Ÿ‘‰ Python ๐Ÿ‘‰ Unit 3


 Python Data Types

เคกाเคŸा เคŸाเค‡เคช เค•िเคธी เคช्เคฐोเค—्เคฐाเคฎ (เค†เคฎเคคौเคฐ เคชเคฐ เคเค• เคธॉเคซ्เคŸเคตेเคฏเคฐ) เคฎें เค‰เคชเคฏोเค— เค•िเคฏे เคœाเคจे เคตाเคฒे เคกाเคŸा เค•े เคช्เคฐเค•ाเคฐ เค•ो เคฆเคฐ्เคถाเคคे เคนैं। เค‰เคฆเคนाเคฐเคฃ เค•े เคฒिเค เคฏเคฆि เค•ोเคˆ เคธॉเคซ्เคŸเคตेเคฏเคฐ เคฏूเคœเคฐ เคธे เคจाเคฎ เค‡เคจเคชुเคŸ เค•เคฐเคจे เค•े เคฒिเค เค•เคนเคคा เคนै เคคो เคฏूเคœเคฐ เค•ा เคจाเคฎ เคเค• เคธ्เคŸ्เคฐिंเค— เคŸाเค‡เคช เค•ा เคกाเคŸा เคนै เค ीเค• เค‡เคธी เคช्เคฐเค•ाเคฐ เคฏूเคœเคฐ เค•ा เคฎोเคฌाเค‡เคฒ เคจंเคฌเคฐ เคเค• เค‡เคจ्เคŸिเคœเคฐ เคŸाเค‡เคช เค•ा เคกाเคŸा เคนै। 

Data types refer to the types of data used in a program (usually a software). For example, if a software asks the user to input a name, then the user's name is a string type of data, similarly the user's mobile number is an integer type of data.


เคชाเค‡เคฅเคจ เคช्เคฐोเค—्เคฐाเคฎ เคฎें เคกाเคŸा เค•ो เคเค• เค‘เคฌ्เคœेเค•्เคŸ (เค…เคจ्เคฏ เคช्เคฐोเค—्เคฐाเคฎिंเค— เคฒैंเค—्เคตेเคœ เคฎें เคตेเคฐिเคเคฌเคฒ) เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคœाเคคा เคนै। เคฎेเคฎोเคฐी เคฎें เคธ्เคŸोเคฐ เคช्เคฐเคค्เคฏेเค• เค‘เคฌ्เคœेเค•्เคŸ เค•ा เค…เคชเคจा เคเค• เคชเคนเคšाเคจ (id), เคเค• เคช्เคฐเค•ाเคฐ (type) เค”เคฐ เคเค• เคฎाเคจ (value) เคนोเคคा เคนै।

Data in a Python program is represented by an object (a variable in other programming languages). Each object stored in memory has its own identity (id), type and value.


เคชाเค‡เคฅเคจ เค•े type() เคซंเค•्เคถเคจ เค•ा เค‰เคชเคฏोเค— เค•เคฐเค•े เค•िเคธी เคญी เค‘เคฌ्เคœेเค•्เคŸ เค•े เคŸाเค‡เคช เค•ो เคœाเคจा เคœा เคธเค•เคคा เคนै। เค‘เคฌ्เคœेเค•्เคŸ เค•ी id เค•े เคธเคฎाเคจ type เคญी เค…เคชเคฐिเคตเคฐ्เคคเคจीเคฏ เคนोเคคा เคนै। 

The type of any object can be known using Python's type() function. Like the id of the object, the type is also unchangeable.


เค‘เคฌ्เคœेเค•्เคŸ्เคธ เค•े เคฎाเคจ (value) เคฎें เคชเคฐिเคตเคฐ्เคคเคจ เค•เคฐเคจे เค•े เค†เคงाเคฐ เคชเคฐ เค‘เคฌ्เคœेเค•्เคŸ्เคธ เค•ो Mutable เค”เคฐ Immutable เคฆो เคตเคฐ्เค—ों เคฎें เคฌांเคŸा เคœा เคธเค•เคคा เคนै। Mutable เค‘เคฌ्เคœेเค•्เคŸ्เคธ เค•ो เคฎेเคฎोเคฐी เคฎें เคธ्เคŸोเคฐ เค•เคฐเคจे เค•े เคฌाเคฆ เค‰เคจเค•े เคฎाเคจ เคฎें เคชเคฐिเคตเคฐ्เคคเคจ เค•िเคฏा เคœा เคธเค•เคคा เคนै เคœเคฌเค•ि Immutable เค‘เคฌ्เคœेเค•्เคŸ्เคธ เค•े เคฎाเคจ เคฎें เคชเคฐिเคตเคฐ्เคคเคจ เคจเคนीं เค•िเคฏा เคœा เคธเค•เคคा। 

On the basis of changing the value of objects, objects can be divided into two categories, Mutable and Immutable. Mutable objects can change their value after storing in the memory while the value of Immutable objects cannot be changed.


เคกाเคŸा เคŸाเค‡เคช เคœो เคชाเค‡เคฅเคจ เคฎें เคชเคนเคฒे เคธे เค‰เคชเคฒเคฌ्เคง เคนै เคฌिเคฒ्เคŸ-เค‡เคจ (built-in) เคกाเคŸा เคŸाเค‡เคช्เคธ เค•เคนเคฒाเคคे เคนैं। เคกाเคŸा เคŸाเค‡เคช เคœो เคฏूเคœเคฐ (เค†เคฎเคคौเคฐ เคชเคฐ เคช्เคฐोเค—्เคฐाเคฎเคฐ ) เคฆ्เคตाเคฐा เคฌเคจाเคฏे เคœाเคคे เคนैं เคฏूเคœเคฐ-เคกिเคซाเค‡ंเคก (user-defined) เคกाเคŸा เคŸाเค‡เคช เค•เคนเคฒाเคคे เคนैं। 

Data types that are already available in Python are called built-in data types. Data types that are created by the user (usually programmer) are called user-defined data types.


Built-in Data Types in Python

  • None Type : "NoneType"
    เคชाเคฏเคฅเคจ เคฎें, NoneType เคเค• เคกेเคŸा เคช्เคฐเค•ाเคฐ เคนै เคœो เค•िเคธी เคฎाเคจ เค•ी เค…เคจुเคชเคธ्เคฅिเคคि เค•ो เคฆเคฐ्เคถाเคคा เคนै। เค‡เคธเค•ा เค‰เคชเคฏोเค— เค…เค•्เคธเคฐ เคฏเคน เค‡ंเค—िเคค เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै เค•ि เค•िเคธी เคตेเคฐिเคเคฌเคฒ เคฏा เคธเคฎीเค•เคฐเคฃ เค•ा เค•ोเคˆ เคธाเคฐ्เคฅเค• เคฎूเคฒ्เคฏ เคจเคนीं เคนै।
    (In Python, NoneType is a data type representing the absence of a value. It is often used to indicate that a variable or expression has no meaningful value.)
    eg:  age = None

  • Boolean Type : "bool" 
    เคชाเคฏเคฅเคจ เคฎें, เคฌूเคฒ เคกेเคŸा เคช्เคฐเค•ाเคฐ เคชाเค‡เคฅเคจ เคฎें เคชเคนเคฒे เคธे เคฎौเคœूเคฆ เคนै เคœो เคฌूเคฒिเคฏเคจ เคฎाเคจों เค•ा เคฆเคฐ्เคถाเคคा เคนै, เคœो เคธเคนी เคฏा เค—เคฒเคค เคนो เคธเค•เคคा เคนै। เคฌूเคฒिเคฏเคจ्เคธ เคช्เคฐोเค—्เคฐाเคฎिंเค— เคฎें เคฎौเคฒिเค• เคนैं เค•्เคฏोंเค•ि เค‰เคจเค•ा เค‰เคชเคฏोเค— เค…เค•्เคธเคฐ เคจिเคฐ्เคฃเคฏ เคฒेเคจे เค”เคฐ เคช्เคฐोเค—्เคฐाเคฎ เค•े เคช्เคฐเคตाเคน เค•ो เคจिเคฏंเคค्เคฐिเคค เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै।
    (In Python, bool is a built-in data type that represents boolean values, which can be either True or False. Booleans are fundamental in programming as they are often used for making decisions and controlling the flow of a program.) eg: True, False

  • Numeric Type : 
    • "int"
      เคชाเคฏเคฅเคจ เคฎें, int เคเค• เคกेเคŸा เคช्เคฐเค•ाเคฐ เคนै เคœिเคธเค•ा เค‰เคชเคฏोเค— เคชूเคฐ्เคฃांเค•ों เค•ो เคฆเคฐ्เคถाเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै, เคœो เคฌिเคจा เค•िเคธी เคฆเคถเคฎเคฒเคต เคฏा เคญिเคจ्เคจाเคค्เคฎเค• เคญाเค— เค•े เคชूเคฐ्เคฃ เคธंเค–्เคฏाเคँ เคนैं। เคชूเคฐ्เคฃांเค• เคงเคจाเคค्เคฎเค•, เค‹เคฃाเคค्เคฎเค• เคฏा เคถूเคจ्เคฏ เคนो เคธเค•เคคे เคนैं। เค†เคช เค—เคฃिเคคीเคฏ เคธंเคšाเคฒเคจ เค•เคฐเคจे เค”เคฐ เค…เคชเคจे เคชाเคฏเคฅเคจ เคช्เคฐोเค—्เคฐाเคฎो เคฎें เคชूเคฐ्เคฃ เคธंเค–्เคฏाเค“ं เค•े เคธाเคฅ เค•ाเคฎ เค•เคฐเคจे เค•े เคฒिเค int เคช्เคฐเค•ाเคฐ เค•ा เค‰เคชเคฏोเค— เค•เคฐ เคธเค•เคคे เคนैं।
      (In Python, int is a data type used to represent integers, which are whole numbers without any decimal or fractional parts. Integers can be positive, negative, or zero. You can use the int type to perform mathematical operations and work with whole numbers in your Python programs.) eg- 5, 12, 0

    • "float"   
      เคเคธे เคธंเค–्เคฏाเคँ เคœिเคจเคฎे เคฆเคถเคฎเคฒเคต เคญाเค— เคนो เค”เคฐ Immutable  eg- 5.5, 12.0

    • "complex"
      เคเคธे เคธंเค–्เคฏाเคँ เคœिเคจเคฎे เคฆो เคฎाเคจ เคนोเคคे เคนैं, เคชเคนเคฒा เคตाเคธ्เคคเคตिเค• เคญाเค— เคนै เคœो เคตैเค•เคฒ्เคชिเค• เคนोเคคा เคนै, เค”เคฐ เคฆूเคธเคฐा เค•ाเคฒ्เคชเคจिเค• เคญाเค— เคนै เค”เคฐ Immutable  eg- 5j, 1.1 +3j

  • Sequences Type : 
    • "str" 
      เค…เค•्เค•्เคทเคฐों เค•ा เคธเคฎूเคน เค”เคฐ Immutable eg- 'hello', "5"

    • "list" 
      เค•เคˆ เคฎाเคจो เค•ा เคธเคฎूเคน เค”เคฐ Mutable   eg- [5, 8, 5] 

    • "tuple"
      เค•เคˆ เคฎाเคจो เค•ा เคธเคฎूเคน เคฒेเค•िเคจ Immutable eg- (5, 8, 5)

  • Set Type : 
    • "set"
       เค•เคˆ เคฎाเคจो เค•ा เคธเคฎूเคน เคฒेเค•िเคจ เคฏूเคจिเค• เค”เคฐ Mutable  eg- {5, 8}

    • "frozenset"
      เคธेเคŸ เค•े เคธเคฎाเคจ เคฒेเค•िเคจ Immutable 

  • Mapping Type : 
    • "dict"
      เคชेเคฏเคฐ्เคธ (เคœोเฅœे) เคฎें เคฎाเคจ เคธ्เคŸोเคฐ เค•เคฐเคคा เคนै เค”เคฐ Mutable eg- {"name" : "cat", "age" : 4}





NEXT:-
 
---END---

Comments