Skip to content

Commit

Permalink
String manipulation program.
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag03 committed Mar 9, 2016
1 parent 56e268b commit 2cc8475
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Nobitanstring.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
testcase_value = int(raw_input())
j = 0
line = []
while j < testcase_value:
x = raw_input()
line.append(x)
j = j + 1
for value in line:
value = value.split()
count = len(value)
loop_value = count/2
count = count - 1
i = 0
while i < loop_value:
value1 = value[i]
value2 = value[count]
value[i] = value2
value[count] = value1
i = i + 1
count = count - 1
req_value = ' '.join(value)
print req_value

0 comments on commit 2cc8475

Please sign in to comment.