Python Tutorial for Beginners 14 - Python Tuples

preview_player
Показать описание
In this video I am going to show What are Tuples and How to use Tuples in python. Python Tuples are another kind of sequence that functions similar to a list - they have elements which are indexed starting at 0. But Tuples are "immutable" i.e. Unlike a list, once you create a tuple, you cannot alter its contents.
So Tuple is an an immutable sequence which is Very similar to a list but Tuple is created it cannot be changed
Format: tuple_name = (item1, item2)
Tuples support operations as lists i.e.Subscript indexing for retrieving elements, Also Methods such as index, Built in functions such as len, min, max, Slicing expressions, The in, +, and * operators. Tuples do not support the methods like append, remove
insert, reverse, sort.
Advantages for using tuples over lists:
1)Processing tuples is faster than processing lists
2)Tuples are safe
3)Some operations in Python require use of tuples
list(tuple_var) function: converts tuple to list
tuple(list_var) function: converts list to tuple

The list of all functions which can be use with Python Tuples:
['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'count', 'index']

#PythonTutorialforBeginners #ProgrammingKnowledge #LearnPython #PythonCourse
★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

Ur way of teaching is easy for us to understand... it's greatly helpful...thank you

kavyavijayakumar
Автор

You have very good teaching skill. This videos are very interesting and easy to understand. Please keep post this kind of videos to help us to understand more about Python. Thanks.

baskarr
Автор

i like your indian accent. it gives the lesson some life

snazrin
Автор

Perfect Job! and thank you for your real effort to help us understanding and learning python

themultilangualcoder
Автор

Nice bro ❤️❤️, from India, Tamil Nadu. I understood your communication that's what I want 😍😘

type
Автор

what if i once deleted and i want to get the back list or tuple?

gokcemusul
Автор

HeY freind I Got Questions if i learn Algorithm imost already Know Discrete mathematics Or nOt

hazanahmed