Tuesday, 21 April 2020

Difference Between Python Lists, Tuples and Sets

Difference Between Python Lists, Tuples and Sets





List Tuple Set
mutable or changeable immutable or unchangeable mutable or changeable
can have duplicate values can have duplicate values don't have duplicate values
eclosed in square brackets [] enclose in round brackets () enclosed in curly brackets
e.g. [1,2,3] e.g. (1,2,3) e.g. {1,2,3}




Kindly provide your feedback.

No comments:

Post a Comment

Sending email using Python

Python has provided smtplib library in order to send email. import smtplib #domain name for the smtp server and port number conn = smtplib.S...