% operator string formatting in Python

PHOTO EMBED

Thu Aug 24 2023 14:23:05 GMT+0000 (Coordinated Universal Time)

Saved by @pythonHub #python #python-hub #basics

name = "Python"
age = 31
number = 284.242

print("I am %s I am %d years old. I support floating point numbers like %f." % (name, age, number))
content_copyCOPY