range(len(x)) is actually not that important. You probably need to be using enumerate() more often.
On Fri, Apr 10, 2020 at 9:44 PM Chamoun Saoma <[email protected]> wrote: > I have an idea to improve the python language through the creation of a > new and very readable function. > > > ################# > def ranlen(x): > #range of length of x > return range(len(x)) > ################# > > This will be a simple to use and very readable way of creating ranges of > indexes. I hope for this to become a new pythogenic way of writing code, > especially because using range(leng(x)) is so essential when implementing > various algorithms. > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/FZYSNZN2R2GPA2SKGWYFU3BUCSE3TNF2/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/L2JBZLS6NUQYT5UYXT2FQMDYQRDUWFK4/ Code of Conduct: http://python.org/psf/codeofconduct/
