known as -strings the easiest way to understand -strings is to see them in action here' what the above string looks like when written as an -stringf"{namehas {headsheads and {armsarms'zaphod has heads and armsthere are two important things to notice about the above example the string literal starts with the letter before the opening quotation mark variable names surrounded by curly braces ({}are replaced by their corresponding values without using str(you can also insert python expressions between the curly braces the expressions are replaced with their result in the stringn "{ntimes {mis { * }' times is it' good idea to keep any expressions used in an -string as simple as possible packing bunch of complicated expressions into string literal can result in code that is difficult to read and difficult to maintain -strings are available only in python version and above in earlier versions of pythonyou can use format(to get the same results returning to the zaphod exampleyou can use format(to format the string like this"{has {heads and {armsformat(nameheadsarms'zaphod has heads and armsf-strings are shorter and sometimes more readable than using format(you'll see -strings used throughout this book