+ 4

List, Tuple, Set - what are the special scenarios that these are being used differently in python?

I read what is written in the Course modules yet I didn't quite understand when should I exclusively use 'Set' and not 'tuple' or 'list' or a 'tuple' but not a 'set' or 'list'.

19th May 2019, 5:29 AM
Souvik Sinha
Souvik Sinha - avatar
2 odpowiedzi
+ 4
Ok.. thanks. 🙂
19th May 2019, 7:03 AM
Souvik Sinha
Souvik Sinha - avatar
+ 3
So, if I don't have any duplicate elements, I don't need 'set' right?.. Now have to check whether it needs in place modifications-if yes: go for 'list' else: 'tuple'. It's may be too much to ask, yet can you give a small example of immutable content? I mean the scenario of immutable content. Probably I'm being naive here, actually I'm.
19th May 2019, 6:37 AM
Souvik Sinha
Souvik Sinha - avatar