<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_string(self, obj):
 """ Picks up an object and transforms it into a string, by coercing each element in an iterable to a string and then joining them, or by trying to coerce the object directly """

        try:
            converted = [str(element) for element in obj]
            string = ','.join(converted)
        except TypeError:
            # for now this is ok for booleans
            string = str(obj)
        return string