python help please. not sure why code is not working for the input displayed at the bottom.
currently using this code
for i in range(dataLength) :
if (i!=len(data)-1):
print(data[i],end=',')
else:
print(data[i],end='#')
Brightspace would look like this: { ist element 1},{1 ist element 2},{1 ist element 3},,{ last list
element }# You are going to take the data from the list provided via input and output its contents in
this format. Details Input - Program input is handled for you. After some initial processing (by me),
you will be left with the following: - an array called data (with elements of the String data type).
Processing/Output - Loop through the array data - Output the elements from the array such that
each element is separated by a comma and the last element is followed by the the character
AtOutput: Expected: # Feedback: Input: string EOF

python help please not sure why code is not working for the.pdf

  • 1.
    python help please.not sure why code is not working for the input displayed at the bottom. currently using this code for i in range(dataLength) : if (i!=len(data)-1): print(data[i],end=',') else: print(data[i],end='#') Brightspace would look like this: { ist element 1},{1 ist element 2},{1 ist element 3},,{ last list element }# You are going to take the data from the list provided via input and output its contents in this format. Details Input - Program input is handled for you. After some initial processing (by me), you will be left with the following: - an array called data (with elements of the String data type). Processing/Output - Loop through the array data - Output the elements from the array such that each element is separated by a comma and the last element is followed by the the character AtOutput: Expected: # Feedback: Input: string EOF