I would like to change the list function len to having the name lend in the python source code. That way, instead of len(list) I could run lend(list)
How would I go about this. I'm running Python 2.7.5 on Mac OS 10.9.
Kebap wrote:Here is an answer however:
- Code: Select all
That way, lend(list) would also return the results expected by len(list).
lend = len
>>> lend = len
Mekire wrote:As Micseydel already pointed out, all you would need to do is:
Users browsing this forum: No registered users and 3 guests