# [Lua], <s>205</s> 187 bytes <!-- language-all: lang-lua --> ```lua load("t=".. ....."c=#t for i=1,c do c=math.max(c,#t[i])end p=io.write p'{'for i=1,c do for j=1,c do _=j==1 and p'{'p(t[i]and t[i][j]or 0)p(j==c and'}'or',')end _=i~=c and p','end p'}'")() ``` [Try it online!][TIO-koayicvr] [Lua]: https://www.lua.org/ [TIO-koayicvr]: https://tio.run/##bY/RagMhEEXf9ysG86DCILtJ@uiXhLCIm1KXzSrGNgGxv74dLQ0t9GEY78y5c3F5N9virVkggYbcAbBcGLaeC@byFD32pFthfT8XA@7xgMdfA2L2VAeqI760RelefYQRPyjJreCCcfEmkoTJU76ZBEuaKQW0V4pZvUtQDU4PaIkBq68mvamreQiLu3RyZ3lZJwjaeXWPLl0g8Mz/WKqYf8SoZ60HMNVDYBD1RFW1n@Yzsb0MgiBbIV64jxx5Cxm1@/wekxd5yyWASSE3CNGtSciOptv2z9@/AA "Lua – Try It Online" ### Human readable code: ``` load( "t=".. ..... "c=#t for i=1,c do c=math.max(c,#t[i]) end p=io.write p'{' for i=1,c do for j=1,c do _=j==1 and p'{' p(t[i]and t[i][j]or 0) p(j==c and'}'or',') end _=i~=c and p',' end p'}' ") () ```