Formatting with %

    list1 = [0]
    list2 = [0]
    return root1, root2

print("The roots are %l and %l.") % (list1, list2)

I am writing a code and I want to insert a list. What letter with % do I write so that Python can expect a list as the insert? Is it a lower case l?


As far as I can tell, there is no format type, %l but there is a type %r for representation.

But there are some other questions that come up. Where are root1 and root2 defined? If this is a function, where is the definition? If you are returning list1 and list2, what variables are set to receive them? They are not defined outside of the function (if they are local).