We have to create a program that takes keeps taking characters from…
Question Answered step-by-step We have to create a program that takes keeps taking characters from… We have to create a program that takes keeps taking characters from the user till an ‘x’ is entered. Put each character in the list. Show the list. Once the list is complete (i.e. x is entered in the list), tell the user how many members are in the list. Then ask the user if they want to swap any two indices. Take the index positions as input from the user, swap the elements, show the list, and that ends the program.Sample Output: Please enter a character in the list: aPlease enter a character in the list: bPlease enter a character in the list: cPlease enter a character in the list: dPlease enter a character in the list: ePlease enter a character in the list: x Your list is [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘x’] Which two indices do you want to exchange?Index 1: 2Index 2: 4 Your new list is [‘a’, ‘b’, ‘e’, ‘d’, ‘c’, ‘x’] Computer Science Engineering & Technology Python Programming BUSA 526 Share QuestionEmailCopy link Comments (0)


