You can drop the list conversion, since strings are iterable, i.e. ` ",".join(str(conf))