Question: Integer input_count is read from input representing the number of values to be read next. The remaining values are read from input into value_list. Use
Integer input_count is read from input representing the number of values to be read next. The remaining values are read from input into value_list. Use a loop to output all values in value_list on the same line, and surround each value with square brackets. End with a newline. Ex: If the input is: 3 11 10 19 then the output is: List has 3 elements: [11][10][19] Note: Using print() with end='' causes the output to end without a default newline. input_count = int(input()) value_list = [] for i in range(input_count): value_list.append(int(input())) print(f'List has {input_count} elements:')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
