Skip to content
Advertisement

printing a nested list without brackets and commas work, python

JavaScript

How do I print the given list in a such a way that the commas ‘,’ and the brackets ‘[]’ are separated, and there is a new line every three elements. I’ve tried the code given below, but it doesn’t work.

JavaScript

I want the output to be like:

JavaScript

basically, it’s a maze without the upper and lower roofs

At the same time, How should I represent the upper and lover borders of the maze? Thanks

Advertisement

Answer

JavaScript

or use join method:

JavaScript

have fun :)

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement