Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use Python Input a string, reverse the string and insert commas between each character to output, for example Input: The first line at the beginning
use Python
Input a string, reverse the string and insert commas between each character to output, for example
Input:
The first line at the beginning represents the number of test data. Next, input "Orange", first reverse to "egnarO", insert commas "e,g,n,a,r,O" in the middle.
Note 1: For the read-in string, the last character is ' ' (please judge the last character so that it is not in the loop) Note 2: The output string should not have a comma at the end (please judge the last character and don't add a comma)
input | output |
2 | e,g,n,a,r,O |
Orange | .,k,o,o,b, ,a, ,s,i, ,s,i,h,T |
This is a book. |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started