a guest Oct 18th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def reduce_str(string, n=1):
  2.     answer=""
  3.     if(n>=len(string)):
  4.         return string
  5.     else:
  6.         for x in range(0, n):
  7.             answer+=string[x]
  8.         return answer
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