AI engineering glossary · Python core

What is escape sequence?

Escape sequence: A backslash followed by a character inside a string that stands for a special character, such as \n for a new line, \t for a tab, \\ for a backslash or \' for a quote. It lets you include characters that are hard to type directly.

Level: beginnerTopic: Python core

Escape sequence: an example

print('Name\tCity\nAsha\tPune') prints two lines with tab-separated columns.

Related terms

More Python core terms

Where you learn it

Escape sequence is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.