See this other post for an alternative solution using Base Iterators.product:
import Base.Iterators: flatten, product
N = 6
collect(flatten([product([0:1 for _ in 1:N]...)]))
See this other post for an alternative solution using Base Iterators.product:
import Base.Iterators: flatten, product
N = 6
collect(flatten([product([0:1 for _ in 1:N]...)]))