DEV Community

Discussion on: One Simple Trick to Reduce Your Memory Usage in Python

Collapse
 
juancarlospaco profile image
Juan Carlos
import sugar, math
let my_large_list = collect(new_seq, for i in 0 ..< 100000: i)
echo sum(my_large_list)
echo "My list is ", sizeof(my_large_list), " bytes"
Enter fullscreen mode Exit fullscreen mode

play.nim-lang.org/#ix=3noU
ðŸĪŠðŸ‘