qiita.py
import itertools
list(itertolls.product("abc",repeat=3))
>>>[("a","a","a"),("a","a","b")...("c","c","c")] #全部で27パターン
list(itertolls.product("abc"),repeat=2))とlist(itertolls.product("abc")("abc")("abc"))は同じ意味。
More than 5 years have passed since last update.
import itertools
list(itertolls.product("abc",repeat=3))
>>>[("a","a","a"),("a","a","b")...("c","c","c")] #全部で27パターン
list(itertolls.product("abc"),repeat=2))とlist(itertolls.product("abc")("abc")("abc"))は同じ意味。
Register as a new user and use Qiita more conveniently