Transform String Into Array Javascript Length Function In Python