String Formatting

String formatting lets you inject items into a string rather than trying to chain items together using commas or string concatenation. As a quick comparison, consider: player = 'Thomas' points = 33 'Last night, '+player+' scored '+str(points)+' points.' # concatenation f'Last night, {player} scored {points} points.' # string formatting There are three ways to perform … Continue reading String Formatting