Hello Alexey,
I changed your notebook a bit, have a look at this piece of code:
ClearAll["Global`*"]
a = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
For[i = 2, i <= Length[a], i++,
b = Select[a, # < 2 a[[i]] || # > 3 a[[i]] &];
Print[i, ",", b];
Print["#### ", a];
a = Complement[a, b];
Print["**** ", a]]
Basically you need to seperate your commands with a semicolon (;
). In general one should try to avoid For
-loops and this infamous Print
command; better would be a more functional style and e.g. a Reap
- Sow
constuct for returning values as in my example above.
Regards -- Henrik