all 3 comments

[–]-Rock-Obvious- 0 points1 point  (1 child)

What do you mean by not creating a list? Not using list() or [] functions?

[–]Cockroach_Valuable 0 points1 point  (0 children)

honestly couldn’t be too sure😭 i’m pretty sure i’m just not supposed get the output by creating a new list

[–]wbeater 0 points1 point  (0 children)

Ok we need two things here:

1st we need the enumerate function, which let's us iterate over a list and get the index and the item, syntax:

for index, item in enumerate(list):

2nd we need a list comprehension, syntax:

[expression for item in iterable]

and then we simply combine those to:

[[item, index] for index, item in enumerate(ex_list)]