Question: Python Geany Write a program that takes keeps taking characters from the user till an q is entered. Put each character in the list. Show
Python Geany
Write a program that takes keeps taking characters from the user till an q is entered. Put each character in the list. Show the list.
Once the list is complete (i.e. q 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 index locations. 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: a
Please enter a character in the list: b
Please enter a character in the list: c
Please enter a character in the list: d
Please enter a character in the list: e
Please enter a character in the list: q
Your list is [a, b, c, d, e, q]
Which two indices do you want to exchange?
Index 1: 2
Index 2: 4
Your new list is [a, b, e, d, c, q]
Good Bye.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
