Length Of Python Array Using Reduce Function In R