title: SyntaxError on world building using DSL
body: <p>Im new to python and learning to code. Im currently experiencing an error in my world buidling.</p>
  <p>here is the error:
  SyntaxError: DSL is invalid!</p>
  <p>The code I have for what im doing is below:</p>
  <pre><code>    world_dsl = &quot;&quot;&quot;
  |  |VT|  |
  |  |EN|  |
  |EN|ST|EN|
  |  |EN|  |
  &quot;&quot;&quot;
  def is_dsl_valid(dsl):
      if dsl.count(&quot;|ST|&quot;) != 1:
          return False
      if dsl.count(&quot;|VT|&quot;) == 0:
          return False
      lines = dsl.splitlines()
      lines = [l for l in lines if 1]
      pipe_counts = [line.count(&quot;|&quot;) for line in lines]
      for count in pipe_counts:
          if count != pipe_counts[0]:
              return False
  
      return True
  
  tile_type_dict = {&quot;VT&quot;: VictoryTile,
                    &quot;EN&quot;: EnemyTile,
                    &quot;ST&quot;: StartTile,
                    &quot;  &quot;: None}
  
  world_map = []
  
  def parse_world_dsl():
      if not is_dsl_valid(world_dsl):
          raise SyntaxError(&quot;DSL is invalid!&quot;)
  
      dsl_lines = world.dsl.splitlines()
      dsl_lines = [x for x in dsl_lines if x]
  
      for y, fsl_row in enumerate(dsl_lines):
          row = []
          dsl_cells = dsl.row.split(&quot;|&quot;)
          dsl_cells = [c for c in dsl_cells if c]
          for x, dsl_cell in enumerate(dsl_cells):
              tile_type = tile_type_dict[dsl_cell]
              row.append(tile_type(x, y) if tile_type else none)
  
          world_map.append(row)
  </code></pre>
  <p>and in my game code that loads the world:</p>
  <pre><code>from player import Player
  import world
  from collections import OrderedDict
  
  
  def play():
      print(&quot;Escape from Cave Terror!&quot;)
      world.parse_world_dsl()
      player = Player()
      while True:
          room = world.tile_at(player.x, player.y)
          print(room.intro_text())
          room.modify_player(player)
          choose_action(room, player)
  </code></pre>
  <p>Any help would be appreciated.</p>