Is it possible to use ‘wp_insert_post’ function within a for loop?

Is it possible to use ‘wp_insert_post’ function within a for loop?