USING PYTHON. Thank you in advance Write a program that allows the user to enter a...

80.2K

Verified Solution

Question

Programming

USING PYTHON. Thank you in advance

Write a program that allows the user to enter a series of stringvalues into a list. When the user enters the string ‘done’, stopprompting for values. Once the user is done entering strings,create a new list containing a palindrome by combining the originallist with the content of the original list in a reversed order.

Sample interaction:

Enter string: My

Enter string: name

Enter string: is

Enter string: Sue

Enter string: done

The palindrome is: My name is Sue Sue is name My

Answer & Explanation Solved by verified expert
3.6 Ratings (551 Votes)
Implement the program as followsinitialize an empty list stringlistread first string value from userrepeat until value is not doneappend value to stringlistread next stringvalue from userinitialize another empty list newpalinlistfor each value    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students