'.', 3-6 become '*', above 6 become '#'. Write heatmap(grid) preserving the 2D shape with nested comprehensions and a chained conditional expression.heatmap([[1, 5], [9, 3]])
[['.', '*'], ['#', '*']]
1→., 5→*, 9→#, 3→*.
Chain: '.' if v < 3 else '*' if v <= 6 else '#'.
Wrap in an outer comprehension per row.