So I was trying to do a maze and wanted to transform the maze into a two-dimensional array so it would be easier to manipulate, but I didn't really succeed. The best I've done is a list of string with the following :
map = """
OOOOOOOOOO
O O O O
O . OO O
O O O XO
O OOOO O.O
O O O U
O OOOOOO.O
O O O
O O OOOOOO
O . O O
OOOOOOOOOO
"""
map = [i for i in map.splitlines()]
Thanks for the help
[list(i) for i in map.splitlines()].mapstring as it's currently written, you'll have an empty list at position 0 (since multi-line strings preserve all newlines). If you don't want this, you can add a\`to skip the first newline ->map = """\`