Python Tuple in Hindi

What is Tuple in Python

Python में  Tuple, data का एक ordered और immutable collection होता है जो Elements को round bracket के अंदर  comma separate करके  Store करता है, Tuple का use हम तब करते हैं जब हमें data को  unchangeable form मे store करना होता है।

How to Access Tuple Items

indexing का use करके हम tuple के elements को access कर सकते हैं, indexing 0 से शुरू होती है tuple में negative indexing भी possival है यह -1 से शुरू होती है जो की last value को represent करता है

How to Updates Tuple

Tuple immutable होने के कारण हम इसे direct update तो नहीं कर सकते but अगर tuple के अंदर mutable elements हो जैसे list तो उन elements को modified किया जा सकता है

How to Iterate Tuple Items

tuple के items को iterate करने के लिए हम loop का use करते हैं

How to Join More Than One Tuples

+ operator का use करके हम दो या दो से ज्यादा tuples को join कर सकते है

Nested Tuple

जब हम tuple के अंदर भी tuple का use करते हैं तो इसे nested tuple कहा जाता है

Tuple Methods

python मे tuple के लिए कुछ ही build-in methods होते है, क्योंकि tuple immutable होता है। 

Syntex:

method को किसी भी variable के साथ use करने के लिए dot ( . ) का use करते है।

Example:

count() : इस method का use करके हम tuple के किसी element को काउंट कर सकते हैं। कि वो element, tuple में कितनी बार आया है.

यहाँ कुछ tuple के methods दिए गए है जिन्हे आप इसी तरह से tuple के साथ use करके इनके result को देख सकते है।

 

उम्मीद करते है कि आपको python tuple अच्छे समझ मे आ गया होगा । अपने 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