There may be different things, depending on the context:
indexing / slicing with Ellipsis
I think it is not implemented for any python class, but it should be an arbitrary number of data structure attachments (as needed). So, for example: a[..., 1] should return all other elements of the innermost nested structure:
>>> import numpy as np >>> a = np.arange(27).reshape(3,3,3)
and to verify this ... you are comparing it to Ellipsis (this is a singleton, so it is recommended to use is :
>>> ... is Ellipsis True >>> Ellipsis in [...] True
Recursive Data Structures
Another case when you see [...] in your conclusion is if you have a sequence within the sequence itself. Here it denotes an infinite deeply nested sequence (which is not printed). For example:
>>> alist = ['a', 'b', 'c'] >>> alist[0] = alist >>> alist [[...], 'b', 'c'] # Infinite deeply nested so you can use as many leading [0] as you want >>> alist[0][1] 'b' >>> alist[0][0][0][0][0][1] 'b' >>> alist[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][1] 'b'
You can even replace it several times:
>>> alist[2] = alist >>> alist [[...], 'b', [...]] >>> alist[1] = alist >>> alist [[...], [...], [...]]
To check if you have such recursion in your output, you need to check if the data structure itself is also one of the elements:
>>> alist in alist True >>> any(i is alist for i in alist) True
Another way to get a more meaningful result is to use pprint.pprint :
>>> import pprint >>> pprint.pprint(alist)