Skip to content

Instantly share code, notes, and snippets.

@AhmedHelalAhmed
Created September 1, 2018 20:32
Show Gist options
  • Select an option

  • Save AhmedHelalAhmed/cdac5395b46f718f833df4b96ffa7743 to your computer and use it in GitHub Desktop.

Select an option

Save AhmedHelalAhmed/cdac5395b46f718f833df4b96ffa7743 to your computer and use it in GitHub Desktop.
my try in simple algorithm
our_string=raw_input("Enter a word ")
length = len(our_string)
if length%2 ==0:
print our_string[(length/2)-1]+our_string[length/2];
else:
print our_string[length/2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment