Check out our courses:
Industry-Ready Java Spring Boot, React & Gen AI -Live: https://go.telusko.com/industry-ready...
Coupon: TELUSKO10 (10% Discount)
AI-Powered DevOps with AWS- Live V3: https://go.telusko.com/ai-powered-dev...
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : https://go.telusko.com/masterjava
Coupon: TELUSKO10 (10% Discount)
For More Queries WhatsApp or Call on : +919008963671
website : https://courses.telusko.com/
Java Spring:- https://go.telusko.com/Udemyjavaspring
Java:- https://go.telusko.com/udemyteluskojava
Spring: https://go.telusko.com/udemyteluskosp...
Java For Programmers:- https://go.telusko.com/javaProgrammers
Python : https://go.telusko.com/udemyteluskopy...
Git : https://go.telusko.com/udemyteluskogit
Docker : https://go.telusko.com/udemyteluskodo...
Instagram : / navinreddyofficial
Linkedin : / navinreddy20
WhatsApp : https://go.telusko.com/whatsapp
TELUSKO Android App : https://go.telusko.com/TELUSKOAPP
TELUSKO IOS App : https://apple.co/3SsgmU2
Discord : / discord
In this lecture we will learn:
What are Tuples in Python
Tuples re immutable
Methods used with tuples
When to use tuples over lists?
What are Sets in Python?
Properties of Sets
#1
Tuples:-
Tuple is almost similar to a list in which we can store multiple values.
Tuples are Immutable and we can change values in them.
To define a tuple, () round brackets are used.
We can fetch the values from a tuple using the index value that can be given in a square bracket.
Tuple will give an error when you tried to change a value in it.
#2
count method is used to count the occurrences of an element in a tuple. It counts the number of times that an element is present in a tuple.
e.g., If an element of value 5 is present two times in a tuple, then the count method returns 2.
#3
We can use tuples when we want a list of multiple values but we do not want to change it.
Iteration in the tuple is faster than the list.
#4
Sets:-
Set is a collection of unique elements.
To define the set, we use the {} curly brackets.
Set never follows the sequence.
When we print the set, then the sequence of values in output will be different from the sequence of input.
Duplicate values present in a set will be printed only once in an output.
Set uses the concept of Hash. Hash is used to improve the performance as it fetches the values as fast as possible.
Indexing is not supported in sets as it does not follow sequencing.
Values can not be changed in a set also because index value is not supported.
Github :- https://github.com/navinreddy20/Python-
More Learning :
Java :- https://bit.ly/3x6rr0N
Python :- https://bit.ly/3GRc7JX
Django :- https://bit.ly/3MmoJK6
JavaScript :- https://bit.ly/3tiAlHo
Node JS :- https://bit.ly/3GT4liq
Rest Api :-https://bit.ly/3MjhZwt
Servlet :- https://bit.ly/3Q7eA7k
Spring Framework :- https://bit.ly/3xi7buh
Design Patterns in Java :- https://bit.ly/3MocXiq
Docker :- https://bit.ly/3xjWzLA
Blockchain Tutorial :- https://bit.ly/3NSbOkc
Corda Tutorial:- https://bit.ly/3thbUKa
Hyperledger Fabric :- https://bit.ly/38RZCRB
NoSQL Tutorial :- https://bit.ly/3aJpRuc
Mysql Tutorial :- https://bit.ly/3thpr4L
Data Structures using Java :- https://bit.ly/3MuJa7S
Git Tutorial :- https://bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
https://www.telusko.com
На этой странице сайта вы можете посмотреть видео онлайн #6 Python Tutorial for Beginners | Tuple | Set in Python длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Telusko 03 Июль 2018, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,350,645 раз и оно понравилось 38 тысяч зрителям. Приятного просмотра!