I have tuple with 6 int values, and want to print them with specified separators...
tuple_code = (10, 20, 30, 40, 11, 117)
..and want to print them with diffrent separators to string:
10-20:30.40.11*117
How to unpack tuple properly in this case? What I did so far and looks a bit messy for me.
def to_readable_format(self):
i_code = iter(self.code)
code = "{}-{}:{}.{}.{}*{}".format(str(next(i_code)), str(next(i_code)),
str(next(i_code)), str(next(i_code)),
str(next(i_code)), str(next(i_code)), )
return code