Python Language Concepts: Use String Interpolation to Simplify Text Manipulation

Start Course
level
Introductory
Subject
Software Development
Course Length
21 minutes
Subscription
Foundation

Course Description

String formatting is very common in Python code, so you have most likely already seen it and are somewhat familiar with it. In this course, we'll go over the basics, but mostly cover the differences between old-style (%s) and new-style (.format()) string formatting, describe the things you can do with the new style that can't be done with the old style, and look at some more advanced features of string formatting. We'll also cover "f-strings," a new feature introduced in Python 3.6, which is a very convenient way to interpolate variables into strings, one you may want to use extensively in current or future Python 3.6+ projects.

Requirements

  • Students should already be comfortable with Python language fundamentals, including: writing and using classes, methods, and functions, using container objects (e.g., list or dictionary), using decorators, using string formatting, using conditional operators

Instructors

Michael Dougherty

Michael Dougherty is an experienced full-stack engineer, functional programming aficionado, and musician. When he was 13 he brought a "Learn C++ in 21 days" book with him on a family vacation, and he has been writing code ever since. For the past few years, Michael has worked as a Web Development Mentor, as a Full Stack Senior Software Engineer, as well as on several side projects.