1 | initial version |
Hi, the code above seems fine, the output of the show
function was a pdf file containing -3. Maybe just
g[f[g[0]]]
If you want the result printed then
print g[f[g[0]]]
2 | Improved style. |
Hi, the code above seems fine, the output of the show
function was a pdf file containing -3. Maybe just
f = {-3:4, -2:2, -1:0, 0:1, 1:3, 2:4, 3:-1}
g = {-3:-2, -2:0, -1:-4, 0:0, 1:-3, 2:1, 3:2}
g[f[g[0]]]
If you want the result printed then
f = {-3:4, -2:2, -1:0, 0:1, 1:3, 2:4, 3:-1}
g = {-3:-2, -2:0, -1:-4, 0:0, 1:-3, 2:1, 3:2}
print g[f[g[0]]]