Computer Science, asked by amisha342492, 11 days ago

write a program in python to reverse all strings stored in an array . ( e.g- india is - aidnl si)​

Answers

Answered by akash0107k
0

Answer:

def reverseList(A, start, end):

while start < end:

A[start], A[end] = A[end], A[start]

start += 1

end -= 1

# Driver function to test above function

A = [1, 2, 3, 4, 5, 6]

print(A)

reverseList(A, 0, 5)

print("Reversed list is")

print(A)

Answered by shiva247810
0

Answer:

STEP 1: Declare and initialize an array.

STEP 2: Loop through the array in reverse order that is, the loop will start from (length of the array - 1) and end at 0 by decreasing the value of i by 1.

STEP 3: Print the element arr[i] in each iteration

pls mark me on brain list

Similar questions