wood burning stoves 2.0*
The moose likes Jython/Python and the fly likes Outputting \b in python? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Outputting \b in python?" Watch "Outputting \b in python?" New topic
Author

Outputting \b in python?

Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 300
I want to output

> \b

, so I do:

print('\b')
and a fancy symbol is outputted instaed. This doesn't happen for other letters? So how do I actually output

> \b

? Sorry this question is simple but not much comes in google when you do a search for this character combination...
Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 300
Luke Murphy wrote:I want to output

> \b

, so I do:

print('\b')
and a fancy symbol is outputted instaed. This doesn't happen for other letters? So how do I actually output

> \b

? Sorry this question is simple but not much comes in google when you do a search for this character combination...


Answer...

print('\\b')
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1624
    
  13

You probably figured out by now that '\b' is a special character (backspace), just as '\t' is a tab, and '\n' is a newline, etc.


No more Blub for me, thank you, Vicar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Outputting \b in python?
 
Similar Threads
Final
Want Help Reagarding Reading Text
Doubt on do-while loop
Pattern matching problem
compilation error