Write a program to print double quotes with the string variable


Topic: Write a program to print double quotes with the string variable

Solution

str1 = "Hello world";
print("\"%s\"" % str1)
print('"%s"' % str1)
print('"{}"'.format(str1))



List all Python Programs