Proper use of sep in print
Question: I am new at python, and I am having problems with the use of sep=. What I want
to do is to not have a space between the number `25` and the `.`

Here is my code and the error I get. I am running this code on MAC OSX El
Capitan's Terminal.

code:

    
    
    side = 5
    area = side * side
    print "The area of a square with side ",side,"is ",area,".",sep=" " 
    

Output:

    
    
    print "The area of a square with side ",side,"is ",area,".",sep=" "
    
                                                                   ^
    SyntaxError: invalid syntax
    


Answer: `sep` is an argument to the [`print()`
_function_](https://docs.python.org/3/library/functions.html#print), which
requires you use Python 3 or use a special `from __future__ import
print_function` statement in Python 2 (see the [`print()` function
documentation](https://docs.python.org/2/library/functions.html#print).

The normal plain vanilla [Python 2 `print`
_statement_](https://docs.python.org/2/reference/simple_stmts.html#the-print-
statement) (which is what you appear to be using) does not support altering
the separator used.

Since the separator is _always_ a space, you don't need to specify it here at
all:

    
    
    print "The area of a square with side ", side, "is ", area, "."
    

If you wanted to print _without_ spaces, use string formatting instead:

    
    
    print "The area of a square with side {} is {}.".format(side, area)
    

If you are using a Python 3 tutorial using `print(foo, bar, baz sep='')` or
similar similar syntax, get yourself Python 3 installed, or get yourself a
Python 2 specific tutorial instead.

