0

I have a list of lists with int and string like this:

l = [[1, "two", 3],["four", 5, "six"]].

I need to generate one string, startig a new line for each list, separeted by a semicolon. Like this:

"1, two, 3;
 four, 5, six;"

How can I do this?

Lorenzo
  • 107
  • 1
  • 5

1 Answers1

3
print ";\n".join([", ".join([str(i) for i in s]) for s in l])
Łukasz Ślusarczyk
  • 1,775
  • 11
  • 20