-->
当前位置:首页 > 题库

PROGRAMMING:JMU Python reverse output

Luz5年前 (2021-05-10)题库457
Enter a line of string and do the following.
###Input format:
Elements in a string are separated by spaces or multiple spaces.
###Output format:
Output all elements in the string in reverse order.
Then output the original list.
Then output each element of the original list in reverse order, separated by a space in the middle. Note: the last element cannot be followed by a space.
###Input example:
```in
a b c e f gh
```
###Output example:
```out
ghfecba
['a', 'b', 'c', 'e', 'f', 'gh']
gh f e c b a
```






answer:If there is no answer, please comment