小编ksm*_*wee的帖子

随机串c#

我想知道shuffle string

示例字符串

string word;

//I want to shuffle it
word = "hello"  
Run Code Online (Sandbox Code Playgroud)

我能得到:

rand == "ohlel"
rand == "lleho"
etc.
Run Code Online (Sandbox Code Playgroud)

c# algorithm ironpython

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

Python:在数组中拆分列表

刚开始使用python并且知道足够知道我什么都不知道.我想找到将列表拆分为dicts列表的替代方法.示例列表:

data = ['**adjective:**', 'nice', 'kind', 'fine',
        '**noun:**', 'benefit', 'profit', 'advantage', 'avail', 'welfare', 'use', 'weal', 
        '**adverb:**', 'well', 'nicely', 'fine', 'right', 'okay'] 
Run Code Online (Sandbox Code Playgroud)

我能得到:

[{'**adjective**': ('nice', 'kind', 'fine'),
 '**noun**': ('benefit', 'profit', 'advantage', 'avail', 'welfare', 'use', 'weal'),
 '**adverb**': ('well', 'nicely', 'fine', 'right', 'okay')}] 
Run Code Online (Sandbox Code Playgroud)

python dictionary split list

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

1
推荐指数
1
解决办法
1459
查看次数

标签 统计

c# ×2

ironpython ×2

algorithm ×1

dictionary ×1

list ×1

python ×1

split ×1