title: Difference between println and print in Swift
body: <p>The use of <code>println</code> and <code>print</code> in Swift both print to the console. But the only difference between them seems to be that <code>println</code> returns to the next line whereas <code>print</code> will not.</p>
  
  <p>For example:</p>
  
  <pre><code>println("hello world")
  println("another world")
  </code></pre>
  
  <p>will output the following two lines:</p>
  
  <pre><code>hello world
  another world
  </code></pre>
  
  <p>while:</p>
  
  <pre><code>print("hello")
  print("world")
  </code></pre>
  
  <p>outputs only one line:</p>
  
  <pre><code>helloworld
  </code></pre>
  
  <p>The <code>print</code> seems to be more like the traditional <code>printf</code> in C. The Swift documentation states that <code>println</code> is the equivalent to <code>NSLog</code> but what's the purpose of <code>print</code>, is there any reason to use it other than not returning to the next line?</p>