Ernest Hemingway wrote, all my life, I've looked at words as though I were seeing them for the first time. Words are everywhere in programming. From Google searches to bioinformatics where DNA is sometimes represented as a string of As, Ts, Cs, and Gs, to simple things like message dialogues. Right now, were going to explore Python's string representation and how we can manipulate these values. A string literal is a sequence of characters. In Python, this type is called str. Strings start and end with a single or double quote. Such as hello or how are you? We can include punctuation, as we've just seen, or hyphens. Strings are values and can't be used in an assignment statement. It's a sunny day, we like a side to say to somebody, what a beautiful day. And if it's storming, we might want to say, wow, you're dripping wet. But already we can see that we have a problem, because it goes through green to black at that second hyphen. And indeed, we have a syntax error. The problem, of course, is that we're trying to use a single quote inside a single quoted string. And Python, of course, doesn't really know what we're doing. So, Because of this, Python allows you to use double quotes. And now a sunny_greeting. There's that, and a storm_greeting, is all wet. We have another choice. Instead of using the double quotes on this string, we are allowed to use what's called the escape character, an escape sequence. If we use a backslash, you'll notice first that the string is turned all green. And when I hit return, what we're going to see is that the string is going to appear but we're not going to see the backslash. Furthermore, the single quote markers on the beginning and end of the string will be turned into double quotes. We can concatenate strings using operator plus. Notice that we have to put in our own spaces. With this, we can write a version of Mad Libs where we ask a friend for a noun. Let's say they picked earthworm. So we're going to have the start of a puzzle. And we would like to end this, let's say with an exclamation mark. And the noun they picked is earthworm. Now let’s have them together. We can build up a repeated string using the multiplication operator. And as with regular math, multiplication has precedence over addition. We can override this using parenthesis. We can't, however, add a string to an int or a float. Can't convert float object to str implicitly. Sends a little danger, notice that it's a TypeError. You'll see in a later lecture how to combine strings and numbers. That'll be coming up soon. We can't multiply strings either, even if that string has a number inside it. Can't multiply sequence by non-int of type 'str'. Other operators won't work. TypeError: unsupported operand type(s) for -: 'str' and 'str'. We can't use two strings together with subtraction. We can't divide either. Unsupported operand types for division, for raising to a power. Notice that every one of these is a type error.