32.9k views
5 votes
what is printed by executing the code? myList=[] for index in range (15): myList.append("Hi") print len(myList)

1 Answer

0 votes

Final answer:

The code prints the length of the list after adding 'Hi' to it 15 times.

Step-by-step explanation:

The code will print the length of the list after adding "Hi" to it 15 times. The code uses a for loop to iterate 15 times and in each iteration, it appends the string "Hi" to the list. Finally, it prints the length of the list using the len() function.

User Ceds
by
7.9k points