title: In Python, how can I print out a board of numbers representing tic-tac-toe, with a "|" in between each number?
body: <p>I want to be able to rewrite the code in as few lines as possible, possibly in list comprehension syntax. Here is what the output should be:</p>
  
  <pre><code>1|2|3  
  4|5|6  
  7|8|9
  </code></pre>
  
  <p>This is what I have thought up. The separator doesn't actually print the "|". Any suggestions?</p>
  
  <pre><code>for i in [1,2,3,4,5,6,7,8,9]:
      print(i, sep = "|", end = "")
      if (i) % 3 == 0:
          print()
  </code></pre>