rust-itertools

In Rust, what is the proper way to replicate Python's "repeat" parameter in itertools.product?

In Rust, what is the proper way to replicate Python's "repeat" parameter in itertools.product? Question: In Python, I can do: from itertools import product k = 3 for kmer in product(“AGTC”, repeat=k): print(kmer) In Rust, I can force the behavior of k=3 by: #[macro_use] extern crate itertools; for kmer in iproduct!(“AGTC”.chars(), “AGTC”.chars(), “AGTC”.chars()){ println!(“{:?}”, kmer); …

Total answers: 2