First Half!! @ Dcoder

in #programming11 months ago

Problem: Given a string return its first half.Assume string to have even number of characters.
Input: Input contains a string
Output: Print the first half of string.
Constraints: 0≤string length≤100
Sample Input: Dcoder
Sample Output:
Dco

s = input()
print(s[:len(s)//2])
Sort:  

Congratulations @lochard! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You have been a buzzy bee and published a post every day of the week.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out our last posts:

Hive Power Up Day - June 1st 2023