+ 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'.
4 odpowiedzi
+ 4
Ok.. thanks. 🙂
+ 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.