python Escape sequences

Card Set Information

Author:
etapia001
ID:
254778
Filename:
python Escape sequences
Updated:
2014-01-02 04:27:00
Tags:
escape sequences
Folders:

Description:
escape sequences
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user etapia001 on FreezingBlue Flashcards. What would you like to do?


  1. \\
    • inserts backlash
    • ex:
    • print "hell\\o"
    • output:
    • hell\o
  2. \'
    • inserts (')
    • ex:
    • print "i\'ll"
    • output:
    • i'll
  3. \"
    • inserts (")
    • ex:
    • print "he said \"hello\""
    • output
    • he said hello
  4. \a
    • This character may cause the device receiving it to emit a warning of some kind (usually audible).
    • ex:
    • print "\a"
  5. \b
    • Backspace is used either to erase the last character printed or to overprint it.
    • ex:
  6. \n
    • Goes to the next line. This is also known as the 'newline' escape
    • print 'he\nllo"
    • output:
    • he
    • llo
  7. \r
    • Carriage return, often shortened to CR or return, refers to a control character or mechanism used to reset a device's position to the beginning of a line of text.
    • ex:
    • print "hell\ro"
    • output:
    • o
  8. \t
    • The horizontal tab is usually generated by the Tab key on a standard keyboard. Standardized tabs are set at every multiple of 8 characters horizontally. '\t' has the same effect.
    • ex:
    • print "hell\to"
    • output:
    • hell    o
  9. \v
    A vertical tab is set at every multiple of 6 lines (typically one inch vertically).

What would you like to do?

Home > Flashcards > Print Preview