SHARE
TWEET

Untitled

a guest Jun 26th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def even(n):
  2.     return n % 2 == 0
  3.  
  4. def solution(s):
  5.     n = len(s)
  6.     m = n // 2
  7.     if even(n):
  8.         return s[m-1:m+1]
  9.     else:
  10.         return s[m]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top