through them, it assigns each of the produced values to the corresponding expression on the left. Python has a "string format" operator % that functions analogously to printf format strings in C—e.g. evaluates to "spam=blah eggs=2". In Python 2.6+ and 3+, this was supplemented by the format() method of the str class, e.g. . Python 3.6 added "f-strings": . Strings in Python can be concatenated by "adding" them (with the same operator as for adding integers and floats), e.g. returns "spameggs". If strings contain numbers, they are added as strings rather than integers, e.g. returns "22". Python has various string literals: Delimited by single or double quote marks; unlike in Unix shells, Perl, and Perl-influenced languages, single and double quote marks work the same. Both use the backslash (\) as an escape character. String interpolation became available in Python 3.6 as "formatted string literals". Triple-quoted (beginning and ending with three single or double quote marks), which may span multiple lines and function like here documents in shells, Perl, and Ruby. Raw string varieties, denoted by prefixing the string literal with r. Escape sequences are not interpreted; hence raw strings are useful where literal backslashes are common, such as regular expressions and Windows-style paths. (Compare "@-quoting" in C#.) Python has array index and array slicing expressions in lists, denoted as a[key], or . Indexes are zero-based, and negative indexes are relative to the end. Slices take elements from the start index up to, but not including, the stop index. The third slice parameter called step or stride, allows elements to be skipped and reversed. Slice indexes may be omitted—for example, returns a copy of the entire list. Each element of a slice is a shallow copy. In Python, a distinction between expressions and statements is rigidly enforced, in contrast to languages such as Common Lisp, Scheme, or Ruby. This leads to duplicating some functionality. For example: List comprehensions vs. for-loops Conditional expressions vs. if blocks The eval() vs. exec() built-in functions (in Python 2, exec is a statement); the former is for expressions, the latter is for statements Statements cannot be a part of an expression—so list and other comprehensions or lambda expressions, all being expressions, cannot contain statements. A particular case is that an assignment statement such as cannot form part of the conditional expression of a conditional statement. This has the advantage of avoiding a classic C error of