How to remove the first N elements from a list in Groovy

1 Answer

0 votes
def lst = ["Groovy", "Java", "C++", "C", "Python", "C#"] 
 
lst = lst.drop(3)
 
println lst

 
    
    
/*
run:
    
[C, Python, C#]
    
*/

 



answered Oct 5, 2020 by avibootz

Related questions

1 answer 174 views
1 answer 136 views
2 answers 159 views
1 answer 197 views
1 answer 158 views
...