top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Python: Difference between set and list ? in which scenarios these two things are used ?

0 votes
484 views
Python: Difference between set and list ? in which scenarios these two things are used ?
posted May 27, 2017 by Harshita

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Hi harshitha ,

Set and list is an data type in which set is immutable like tuple but set will have unique elements.List is mutable and can have any no of duplicate elements.

set can be used to store user-name, because user name should be unique among other users. :)

answer May 29, 2017 by Jaganathan
...