0
What Is the meaning of this operator- [::]. And what's the difference between these two- [:] and [::]
Plz answer this question
1 Odpowiedź
+ 2
These are list slicing operations. They generally take index values but when they are not mentioned, it takes into consideration the default values which is shown below.
spam = [1,2,3,4,5,6]
// Both are same
print(spam[:])
print(spam[0:len(spam)])
// Both are same
print(spam[::])
print(spam[0:len(spam):1])