List contents use the repr()
result of the objects contained, which in turn uses the __repr__
method on an object.
print()
converts objects with str()
, which will use a __str__
method, if present, __repr__
otherwise.
You remote
object (a digi.xbee.devices.RemoteZigBeeDevice
instance) only has a __str__
method, and no __repr__
method. Implement the latter to customise how your object is shown in a list.
Alternatively, print all individual values in the list with:
print(*m)
These are then space separated, use sep='...'
to specify a different separator.
Or you could convert all the objects in the list to a string before printing:
print([str(obj) for obj in m])
and print the list of strings.