|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Python, How to print a character \
In python, if I use '\', error, use "\", error again, use '\\' or "\\", the print result will be \\
If I want to print a single \, what can I do? Thanks in advance Sorry... I have solved this problem... Thanks anyway Last edited by pludi; 06-21-2012 at 11:02 AM.. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
I get this: Code:
$ python -c 'print "\\"' \ What do you get? |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Language: Python: Running IDLE from Windows 7 Pro...
Code:
>>> print '\' SyntaxError: EOL while scanning string literal >>> print "\" SyntaxError: EOL while scanning string literal >>> print '\\' \ >>> print "\\" \ >>> Last edited by Scrutinizer; 06-24-2012 at 08:52 AM.. Reason: code tags |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Print the next ASCII character | machomaddy | Shell Programming and Scripting | 2 | 01-31-2012 09:02 AM |
| Print one by one character | divya bandipotu | Shell Programming and Scripting | 7 | 07-22-2011 10:26 AM |
| read the text file and print the content character by character.. | samupnl | Shell Programming and Scripting | 1 | 06-10-2010 03:03 AM |
| python, character replacement | gav2251 | Programming | 0 | 02-19-2009 05:58 AM |
| AWK print a character many times | dbrundrett | Shell Programming and Scripting | 3 | 06-30-2004 10:43 AM |
|
|