Using the following code:
def printformatted(statuses):
for status in statuses:
statusid, statussummary = status.split(",",1)
print "\nSnapshot id: %s" % statusid
print "Summary: %s" % statussummary
print
printformatted("1,Some summary")
gives me the error ValueError: need more than 1 value to unpack
, whereas printformatted(["1,Some summary"])
does not.
Why?