Python, string format, newline (C++ - std::endl)
Question: I format string (in overloading operator **str**) and i don't want to use raw
\n or \r\n tags. Have python cross-platform newline identifier like std::endl
in C++?

I trying to google it, but don't found answer.


Answer: How about using `os.linesep`? It contains the appropriate line separator for
your OS:

    
    
    >>> import os
    >>> os.linesep
    '\n'
    >>> print "line one" + os.linesep + "line two"
    line one
    line two
    

