Python Tuple and Tuple Manipulation | Python Programming in Tamil | #13
In this video we are going to answer the following questions
Python Tuple ?
Python Tuple Management ?
---------------------
Python Tuple
---------------------
Tuples consists of a number of values separated by comma and enclosed within parentheses ().
Tuple is similar to list, values in a list can be changed but not in a tuple
-------------------------------------------------
Advantages of Tuples over list
-------------------------------------------------
1. The elements of a list are changeable (mutable) whereas the elements of a tuple are unchangeable (immutable), this is the key difference between tuples and list.
2. The elements of a list are enclosed within square brackets. But, the elements of a tuple are enclosed by parentheses.
3. Iterating tuples is faster than list.
-------------------------------
Tuple Manipulation
-------------------------------
Creating a Tuple
T = (“Sriram”, ”Vignesh”, 10, 20.40, 1)
Accessing characters in a Tuple
0 1 2 3 4
sriram vignesh 10 20.40 1
-5 -4 -3 -2 -1
T[-3] # 10
T[4] # 1
--------------------------------------
Python Tuple Operators
--------------------------------------
Python provides the following operators for Tuple operations. These operators are useful to manipulate List
(i) Concatenation (+)
Tuple1 + Tuple2
(ii) Append (+ =)
Tuple1 = (“Hello ”)
Tuple1 += ("Learn Python“)
(iii) Repeating (*)
Tuple1 = (“Hi”,)
print (Tuple1*4) # HiHiHiHi
(iv) Tuple slicing
Tuple1[start:end:difference]
Tuple1[0:5:2]
You can download Python from https://www.python.org/
****************************************************************************
YouTube - / @sriramasubramaniamnagarajan
Connect me @
facebook: https://www.facebook.com/profile.php?...
instagram: / sriramasubramaniam
sololearn: https://www.sololearn.com/Profile/104...
PlayList:
C programming - • C Programming Language
Python Programming - • Python Programming
canva - https://www.canva.com/join/simplified...
Auf dieser Seite können Sie das Online-Video Python Tuple and Tuple Manipulation | Python Programming in Tamil | #13 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Sriramasubramaniam Nagarajan 04 Juli 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 123 Mal angesehen und es wurde von 4 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!