I have a piece of code that does this:
def number(self, width = None):
if not self.v:
return None
if not width:
width = len(self.v)
return self.VERSION_DELIMITER.join(map(str, self.v[:width]))
I recently changed to using Python 3 instead of 2. When I did that I started getting the error:
TypeError: 'map' object is not subscriptable:
What is the best way to make this work in Python 3?