Home / Programs / Use the print() function to format the given words in the mentioned format. Display the ** separator between each string.
🚀 Programming Example

Use the print() function to format the given words in the mentioned format. Display the ** separator between each string.

👁 678 Views
💻 Practical Program
📘 Step Learning

Use the print() function to format the given words in the mentioned format. Display the ** separator between each string.

📌 Information & Algorithm

Display three string “Name”, “Is”, “James” as “Name**Is**James”

Use the print() function to format the given words in the mentioned format. Display the ** separator between each string.

Given Input:

'Name', 'Is', 'James'

Expected Output:

For example: print('Name', 'Is', 'James') will display Name**Is**James

Hint:

Use the sep parameter of the print() function to define the separator symbol between each word.

💻 Program Code

print('My', 'Name', 'Is', 'James', sep='**')
                        

🖥 Program Output

My**Name**Is**James
                            
📚 Learning Subject

Master Programming Through Practical Examples

Improve your coding logic, problem-solving skills and programming confidence by practicing real-world examples with explanations.

🎯 How to learn from this example

First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.

🔥 Practice suggestion

Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.