For a vector a=collect(1:1000)
, what is the fastest way to reset it? Currently, I only have one solution:
a=collect(1:1000)
deleteat!(a, 1:length(a))
For a vector a=collect(1:1000)
, what is the fastest way to reset it? Currently, I only have one solution:
a=collect(1:1000)
deleteat!(a, 1:length(a))
empty!(a)
Wow, Thanks. I didn’t know this function before.