Half String - 2
This Program name is Half String - 2. Write a Python program is Half String - 2, it has two test cases
The below link contains Half String - 2 - question, explanation and test cases
https://drive.google.com/file/d/1rl4EMVpnQcr9Kyt6WCER9qy9k1-d8COt/view?usp=sharing
We need exact output when the code was run
string=input('enter first input string:')
length=len(string)
middle_index = length//2
second_half = string[middle_index:]
print(second_half)
string=input('enter second input string:')
length=len(string)
middle_index = length//2
second_half = string[middle_index:]
print(second_half)
Comments
Leave a comment