Python code snippet – How to use enumerate instead of range and len? using enumerate instead of range or len a = [f(n) for n, _ in enumerate(L)] using range and len a = [f(n) for n in range(len(L))] Curly hair, very fair, please share :)Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Reddit (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email a link to a friend (Opens in new window) Subash Chandran 13th October 2021 Leave a Comment