【发布时间】:2021-04-20 03:34:44
【问题描述】:
我试图在文本中找到一个逗号分隔的值并随机更改位置。例如
Good morning. I am James. The weather is very nice today. I ate apples, bananas, milk, sandwich this morning.
And my favorite things are movies, music, read books. And my total assets are $1,555,555,`555.
在上面的字符串中,搜索/apple、banana、milk、sandwich/movie、music、reading/并随机更改位置。在此处排除数字(1,555,555,555 美元)。所以终于
Good morning. I am James. The weather is very nice today. I ate bananas, apples, sandwiches, milk this morning.
And my favorite things are music, movies, read books. And my total assets are $1,555,555,555.
我想这样改。元素应该随机变化。
【问题讨论】:
-
到目前为止你尝试过什么? SO 不是代码编写服务。
-
对不起,我是初学者,所以我不知道该怎么做。我搜索了,但没有找到类似的东西
标签: python string random split