Sunday, September 2, 2018
Python Tutorial for Beginners 14 - Python Tuples
In this video I am going to show What are Tuples and How to use lists 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 Lists:
['__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']
-------------------Online Courses to learn----------------------------
Blockchain Course - http://bit.ly/2Mmzcv0
Big Data Hadoop Course - http://bit.ly/2MV97PL
Java - https://bit.ly/2H6wqXk
C++ - https://bit.ly/2q8VWl1
AngularJS - https://bit.ly/2qebsLu
Python - https://bit.ly/2Eq0VSt
C- https://bit.ly/2HfZ6L8
Android - https://bit.ly/2qaRSAS
Linux - https://bit.ly/2IwOuqz
AWS Certified Solutions Architect - https://bit.ly/2JrGoAF
Modern React with Redux - https://bit.ly/2H6wDtA
MySQL - https://bit.ly/2qcF63Z
----------------------Follow---------------------------------------------
My Website - http://www.codebind.com
My Blog - https://goo.gl/Nd2pFn
My Facebook Page - https://goo.gl/eLp2cQ
Google+ - https://goo.gl/lvC5FX
Twitter - https://twitter.com/ProgrammingKnow
Pinterest - https://goo.gl/kCInUp
Text Case Converter - https://goo.gl/pVpcwL
-------------------------Stuff I use to make videos -------------------
Stuff I use to make videos
Windows notebook – http://amzn.to/2zcXPyF
Apple MacBook Pro – http://amzn.to/2BTJBZ7
Ubuntu notebook - https://amzn.to/2GE4giY
Desktop - http://amzn.to/2zct252
Microphone – http://amzn.to/2zcYbW1
notebook mouse – http://amzn.to/2BVs4Q3
------------------Facebook Links ----------------------------------------
http://fb.me/ProgrammingKnowledgeLear...
http://fb.me/AndroidTutorialsForBegin...
http://fb.me/Programmingknowledge
http://fb.me/CppProgrammingLanguage
http://fb.me/JavaTutorialsAndCode
http://fb.me/SQLiteTutorial
http://fb.me/UbuntuLinuxTutorials
http://fb.me/EasyOnlineConverter
Partner Sites
VideoToGifs.com
EasyOnlineConverter.com
SqliteTutorials.com
Top Online Courses From ProgrammingKnowledge
Python Course http://bit.ly/2vsuMaS
Java Coursehttp://bit.ly/2GEfQMf
Bash Coursehttp://bit.ly/2DBVF0C
Linux Coursehttp://bit.ly/2IXuil0
C Course http://bit.ly/2GQCiD1
C++ Coursehttp://bit.ly/2V4oEVJ
PHP Coursehttp://bit.ly/2XP71WH
Android Coursehttp://bit.ly/2UHih5H
C# Coursehttp://bit.ly/2Vr7HEl
JavaFx Coursehttp://bit.ly/2XMvZWA
NodeJs Coursehttp://bit.ly/2GPg7gA
Jenkins Course http://bit.ly/2Wd4l4W
Scala Coursehttp://bit.ly/2PysyA4
Bootstrap Coursehttp://bit.ly/2DFQ2yC
MongoDB Coursehttp://bit.ly/2LaCJfP
QT C++ GUI Coursehttp://bit.ly/2vwqHSZ