Answer to Question #173894 in Python for Ahmed Duale

Question #173894

1) Write a Python program to print the following string in a specific format:

Sample String : "Twinkle, twinkle, little star, How I wonder what you are! Up above the world so high, Like a diamond in the sky. Twinkle, twinkle, little star, How I wonder what you are"



1
Expert's answer
2021-03-21T06:37:01-0400
# A simple method to output formatted text is to use  three single quotes
a = '''Twinkle, twinkle, little star, 
   How I wonder what you are! '''
b = '''Up above the world so high, 
         Like a diamond in the sky. '''
# separator used when printing between multiple values.
# sep=('\n') - new line
print(a,b,a,sep=('\n'))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS