我想创建一个接受字符串的函数。从提供的字符串中,我想从字符串中提取一个字母,并将其添加到从第一个位置到最后一个位置的每个位置的字符串中。你知道吗
我想一直这样做,直到我有一个完全有意义的词(我有一个“有意义”的词字典,我会检查)
这是我想要的一个例子(从'posta'[对不起意大利人],然后改成posta sposta sposta sposta spossata…)。。。以此类推):
posta
sposta
esposta
sposata
spossata
spostata
spostai
spostati
spostarti
spostasti
spostavi
spostarvi
posata
sposata
spossata
spostata
posita
可能是这样的:
例如,如果将我的'/usr/share/dict/words'作为有效单词,并展开“arm”,则得到:
相关问题 更多 >
编程相关推荐