You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@aperrin66 @akorosov
Although you know it better than me about the data types in python. I need to describe what is in my mind when I create this issue.
Python lists are only needed when we want to save the order of elements inside it. When we don't need order, there is no need to use a python list!!!!
Sets should be used for the case that we add another element in it afterwards.
tuple should be used for the case that we do not need to change it afterwards.
For the speed of running the code the order of selection data types is as follows:
tuple
set
3.list
The text was updated successfully, but these errors were encountered:
Increment in speed is negligible compared to our effort spent on replacing square brackets with curly brackets. Besides in some cases we have to use tuples and in some - sets.
No, let's consistently use lists. And only when we cannot use lists we should use something else.
@aperrin66
@akorosov
Although you know it better than me about the data types in python. I need to describe what is in my mind when I create this issue.
Python lists are only needed when we want to save the order of elements inside it. When we don't need order, there is no need to use a python list!!!!
Sets should be used for the case that we add another element in it afterwards.
tuple should be used for the case that we do not need to change it afterwards.
For the speed of running the code the order of selection data types is as follows:
3.list
The text was updated successfully, but these errors were encountered: