55.1k views
5 votes
Write code that Uses the range() in a for loop to iterate over the positions in user_names in order to modify the list g

User Prasinous
by
4.9k points

1 Answer

1 vote

Answer:

Step-by-step explanation:

The range() function is a built-in function in the Python programming language. In the following code, we will use this function to iterate over all the positions in the array called user_names and add them to the list g. (assuming that is what was meant by modifying the list g)

for i in range( len(user_names) ):

g.append(user_names[i])

This simple 2 line code should do what you are asking for.

User Celerio
by
5.1k points