I wanna make a "Hello, (name)." function in Python by trying to make the C printf function.
I want to turn it from this:
name = input("What's your name? ")
print(f"Hello, {name}.")
Into this:
name = input("What's your name? ")
printf("Hello, %s.", name)
I started off the function like this and I knew it wasn't going to work because of the second argument:
def printf(text, ...):
print(text)
How can I make a properly working printf function like this?
print("Hello,", name)