Why do `print("Hello, World!")` and `print("Hello", "World!")` produce different outputs?
Question: I just installed Python 2.7.2 on Windows XP with the idea of learning how to
program. Several of the tutorial books I'm using give examples of print
commands which, when I try them, I get different answers.

I expected both of these to return the same thing -

    
    
    >>> print("Hello, World!")
    Hello, World!
    >>> print("Hello", "World")
    ('Hello', 'World')
    >>> 
    

I've tried searching around for answers, but I'm not even sure how to explain
where I'm going wrong.


Answer: Since `print` is a statement in Python 2.x, you're getting expected behavior.
`(a,b)` is a tuple, so `print (a,b)` will print it as a tuple.

On the other hand, `print` is a function in Python 3.x, so

    
    
    print("hello world")
    

and

    
    
    print("hello", "world")
    

will yield the same answer.

This is one breaking change when going from Python 2.x to 3.x. Understanding
the difference is important. Type `help()` in your interpreter and then
`print`. You will get different descriptions based on your Python version.

I'd suggest checking out [this
page](http://docs.python.org/release/3.0.1/whatsnew/3.0.html), which describes
in a quick and nice way what worked before and what works now.

