Jul-04-2019, 12:53 AM
I'm doing some simple string formatting examples in Python and I'm using the old style C method for an example in my program. I understand that when you type %s within your string that is simple a placeholder for where your data or argument is going to go.
But what I don't understand is when you type the final % right before your arguments in parentheses, is that actually a method or a function call? When people were doing C language did they learn that as a call to a function?
Here is my code:
But what I don't understand is when you type the final % right before your arguments in parentheses, is that actually a method or a function call? When people were doing C language did they learn that as a call to a function?
Here is my code:
subject = "Engineering" language = "Python" print("I am studying %s and using %s as the programming language" % (subject, language))