Skip to main content
edited title
Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

Insert several elements Inserting an indexed string into the 1st position of each pair in a list of pairs

added 9 characters in body; edited title
Source Link

Insert serveralseveral elements in list

How do I insert "Z" and then a number going from 1 to end(without space), in a list?

How do I insert "Z" and then a number going from 1 to end (without space) in a list?

I have the following list:

Input: list = {{1, 1}, {2, 1}, {3, 1}, {5, 1}, {1, 2}, {2, 2}, {3, 2}}

list = {{1, 1}, {2, 1}, {3, 1}, {5, 1}, {1, 2}, {2, 2}, {3, 2}}

Output: {Z1, 1, 1}, {Z2, 2, 1},{Z3, 3, 1}...

{Z1, 1, 1}, {Z2, 2, 1},{Z3, 3, 1}...

I have tried using the commando "Insert"Insert and looking at inserting at serveralseveral positions, but without luck.

Insert serveral elements in list

How do I insert "Z" and then a number going from 1 to end(without space), in a list?

I have the following list:

Input: list = {{1, 1}, {2, 1}, {3, 1}, {5, 1}, {1, 2}, {2, 2}, {3, 2}}

Output: {Z1, 1, 1}, {Z2, 2, 1},{Z3, 3, 1}...

I have tried using the commando "Insert" and looking at inserting at serveral positions, but without luck.

Insert several elements in list

How do I insert "Z" and then a number going from 1 to end (without space) in a list?

I have the following list:

Input:

list = {{1, 1}, {2, 1}, {3, 1}, {5, 1}, {1, 2}, {2, 2}, {3, 2}}

Output:

{Z1, 1, 1}, {Z2, 2, 1},{Z3, 3, 1}...

I have tried using the commando Insert and looking at inserting at several positions, but without luck.

Source Link

Insert serveral elements in list

How do I insert "Z" and then a number going from 1 to end(without space), in a list?

I have the following list:

Input: list = {{1, 1}, {2, 1}, {3, 1}, {5, 1}, {1, 2}, {2, 2}, {3, 2}}

Output: {Z1, 1, 1}, {Z2, 2, 1},{Z3, 3, 1}...

I have tried using the commando "Insert" and looking at inserting at serveral positions, but without luck.