Write a python program to demonstrate printing a string with single quotes, double quotes and triple quotes.

 

Write a python program to demonstrate printing a string with single quotes, double quotes and triple quotes.


PROGRAM:

s=str(input("Enter the string:"))
print("String with single quotes: '"+str(s)+"'")
print("String with double quotes: \""+ str(s)+"\"")
print("String with triple quotes: \'''"+str(s)+"\'''")

OUTPUT:

No comments:

Post a Comment




Copyright Ⓒ 2022 | Mechpedia | All Right Reserved.