Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 24)
24.
How can you print a formatted string with variable values?
print("Value is: " + variable)
print("Value is:", variable)
format_print("Value is: {}", variable)
print("Value is: %s" % variable)
Answer: Option
Explanation:
Using a comma in the print() function allows you to print a formatted string with variable values in Python.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.