How do you use %d in Python?
Photo Credit: Courtesy of 3DStockPhoto (Do You image)
%s is used as a placeholder for string values you want to inject into a formatted string. %d is used as a placeholder for numeric or decimal values. This line of code will substitute %s with Alice (str) and %d with 42. The %d and %s string formatting "commands" are used to format strings.