首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
字符串按顺序组合出所有可能的组合
字符串按顺序组合出所有可能的组合
mac
2024-09-28
49
def
test
(
str1
)
:
l
=
[
]
for
i
in
range
(
1
,
len
(
str1
)
+
1
)
:
s
=
list
(
combinations
(
str1
,
i
)
)
for
j
in
s
:
l
.
append
(
j
)
return
l
print
(
test
(
'abc'
)
)
转载请注明原文地址: https://mac.8miu.com/read-496156.html
最新回复
(
0
)