0

Which is correct or most preferred?

insert the item at the beginning of the list

or

insert the item to the beginning of the list

4
  • 1. You don't "insert" at the beginning. 2. If you have to use the word insert for other reasons, then say "insert at the beginning." The other alternative of "insert to" is incorrect.
    – Kris
    Jul 27 '18 at 7:49
  • @vth " insert at " is not incorrect and has its uses. As in "insert at the center" or "insert at the fourth place".
    – Kris
    Jul 27 '18 at 7:51
  • In a programming or computer science context, insert at would be the most natural use. In other contexts, maybe “in” or “into” would be better (depending on the meaning).
    – user184130
    Jul 27 '18 at 8:05
  • I have deleted my initial comment following suggestions made by Kris and the answer provided by Jason Bassford . After further research, yes, both insert to and insert at is correct, the latter of which somehow does not even get so much as a mention in most major online dictionaries, which is why I made the false conclusion in the first place.
    – VTH
    Jul 27 '18 at 9:02
0

Just between the two examples, insert at is the more common.

It would typically be used in a technical context.


Here are three examples from Microsoft.

Text.Insert:

Arguments    Description
offset                  The index to insert at.

ParameterBindingRulesCollection.Insert Method:

Parameters

  • index
    Type: System.Int32
     
    index to insert at.

ImmutableArray.Insert Method (Int32, T):

item  
      Type: T
      The item to insert at the start of the array.

And an example from Mozilla:

The Range.insertNode() method inserts a node at the start of the Range.

The new node is inserted at the start boundary point of the Range.


As somebody who's worked a long time in the technical field, inserting items at the beginning of a list sounds natural to me.

However, if you're not talking about a specific list location, but a list in general, it would be more common to say:

Insert the item into the list.

1
  • 1
    I can only assume that this excellent answer got a downvote because you used a Microsoft example instead of Python :)
    – user184130
    Jul 27 '18 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.