[GAP Forum] GAP command to remove first and last element in a list
Vinay Wagh
waghoba at gmail.com
Fri Jun 23 17:34:32 BST 2017
gap> L := List( [ 7..20 ] );;
gap> Remove( L, 1 );
7
gap> Remove( L, Length( L ) );
20
gap> L;
[ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]
Have a look at
https://www.gap-system.org/Manuals/doc/ref/chap21.html#X7E98B11B79BA9167
Hope this helps.
VInay
On 23 June 2017 at 18:09, [Muniru Asiru] maasiru at yahoo.com
<maasiru at yahoo.com> wrote:
>
> I have a list of numbers say
> L:=Elements(List([7..20]));
> My interest is to use a command in GAP to remove 7 and 20 from L so that L now contains numbers between 8 and 19.
> What command should I use? Dr. Muniru A. Asiru, Department of Mathematics & Statistics, The Federal Polytechnic, P.M.B. 55, Bida, Niger State, Nigeria. OR Dr. Muniru A. Asiru, P.O.Box. 294, Bida, Niger State, Nigeria. Email Addresses: maasiru at yahoo.com, remiasiru at yahoo.com, Mobile Phone number: +2348034271010
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
More information about the Forum
mailing list