Categories
Python Answers

How to print multiple arguments in Python?

Spread the love

Sometimes, we want to print multiple arguments in Python.

In this article, we’ll look at how to print multiple arguments in Python.

How to print multiple arguments in Python?

To print multiple arguments in Python, we can print f-strings.

For instance, we write

print(f'Total score for {name} is {score}')

to call print with a f-string that interpolates the values of name and score into the string.

This works since Python 3.6.

Conclusion

To print multiple arguments in Python, we can print f-strings.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *