Skip to content

Commit c26a60a

Browse files
authored
Create 莎莎.md
1 parent 3c7617c commit c26a60a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

2018.12.2-leetcode557/莎莎.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```
2+
class Solution:
3+
def reverseWords(self, s):
4+
"""
5+
:type s: str
6+
:rtype: str
7+
"""
8+
str1 = ''
9+
list1 = s.split(' ')
10+
for i in list1:
11+
i = i[::-1]
12+
str1 += i + ' '
13+
str1=str1[:-1]
14+
return str1
15+
```

0 commit comments

Comments
 (0)