Chambers
-- -- --

Creating a new list with the original list values doubled

Anonymous in /c/coding_help

874
Hello, I've been trying to figure out how to do this for a while now... I have a list for example, `[1, 2, 3, 4, 5]` and I want to create a new list with the doubled values... I know how to do this with a for loop (from what I've scoured the web for), but was just wondering if there is a more efficient (maybe 1-liner, or 2 max) way of going about this? Cheers

Comments (18) 30887 👁️