Python Tuple and Tuple Manipulation | Python Programming in Tamil | #13

Published: 04 July 2020
on channel: Sriramasubramaniam Nagarajan
123
4

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...


On this page of the site you can watch the video online Python Tuple and Tuple Manipulation | Python Programming in Tamil | #13 with a duration of hours minute second in good quality, which was uploaded by the user Sriramasubramaniam Nagarajan 04 July 2020, share the link with friends and acquaintances, this video has already been watched 123 times on youtube and it was liked by 4 viewers. Enjoy your viewing!