Get Length Of String Java Using Lambda Python For Loop