小编use*_*942的帖子

基于python中的块大小在python中反转字符串

我试图根据给定的块大小来反转字符串

例如

"the price of food is 12 dollars" 并且我的块大小为4

我希望最终结果是:

food of price the dollars 12 is
Run Code Online (Sandbox Code Playgroud)

我不知道如何将此输入到python任何帮助将不胜感激我需要这个适用于任何块大小

python python-2.7

5
推荐指数
2
解决办法
492
查看次数

标签 统计

python ×1

python-2.7 ×1