当前位置:网站首页>Sword finger offer (44): flip the word order sequence
Sword finger offer (44): flip the word order sequence
2022-07-26 10:46:00 【Konstanch】
solution 1: String splicing
class Solution:
def ReverseSentence(self, s):
# write code here
string = s.split(' ')
result = ''
for i in string[::-1]:
result += i + ' '
return result[:-1]
边栏推荐
猜你喜欢

RT-Thread 学习笔记(六)--- 开启基于SPI Flash的elmfat文件系统(上)
控制随机抽中几率 [ C# | Random ]

RT thread learning notes (V) -- edit, download and debug programs

文案秘籍七步曲至----文献团队协作管理

mysql20210906

232.用栈实现队列

使用Selenium抓取zabbix性能监控图
![[paper after dinner] deep mining external perfect data for chestx ray disease screening](/img/d6/41c75d292c26b2e7e116767a51eb5e.png)
[paper after dinner] deep mining external perfect data for chestx ray disease screening
![[leetcode daily question 2021/4/23]368. Maximum divisible subset](/img/0b/32ca862963c842a93f79eaac94fb98.png)
[leetcode daily question 2021/4/23]368. Maximum divisible subset

Add touch screen driver for stemwin 5.22 on Shenzhou IV development board
随机推荐
使用flex实现左中右布局,中间自适应
10 let operator= return a reference to *this
剑指Offer(二十):包含min函数的栈
104.二叉树的最大深度
工厂模式详解
2021-08-14三子棋
Sql Server之查询总结
Happens-Before原则深入解读
鹏哥C语言第四课(3)
面试过程中,面试官是如何考察Rust工程师的水平?
剑指Offer(五):用两个栈实现队列
Flutter 防止科学计数并去除尾数无效0
$router和$route的区别
Anaconda is used on vscode (the environment has been configured)
扫雷pro版2021-08-19
鹏哥C语言第七节课总结
sigmod 函数与softmax 函数对比
[leetcode daily question 2021/2/18] [detailed explanation] minimum number of turns of 995. K continuous bits
IAR sprintf 浮点 在UCOS 总格式化成0.0的问题
[notes on machine learning] [building a cyclic neural network and its application] deeplearning ai course5 1st week programming(keras)