String Basics

A string in Python is a sequence of characters. It is a derived data type. Strings are immutable. This means that once defined, they cannot be changed

How can we make a new line, like hitting the enter key when typing?

This is an example of a special character - where 2 digits work together to do one thing

If you see this character in a string, that means that the current line ends at that point and a new line starts right after it

Notice the \n is a different color than the string
These are all the basic escape sequences

Strings and Variables

x = "Python is "
y = "awesome"
z =  x + y
print(z)
a = "Hello"
b = "World"
c = a + b
print(c)

Can you add a space? What doesn't Mrs. Wright Like about these variable names?

Last updated