Advertisement
davide1409

noNum2

Nov 15th, 2019
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. def noNum(s):
  2. #@param s: string
  3. #@return string
  4.   new_str = ''
  5.   for i in range(len(s)):
  6.     if not s[i].isnumeric():
  7.       new_str+=s[i]
  8.      
  9.   return new_str
  10.  
  11. def noNum1(s):
  12. #@param s: string
  13. #@return string
  14.   new_str = ''
  15.   c = 0
  16.   while(c<len(s)):
  17.     if not s[c].isnumeric():
  18.       new_str+=s[c]
  19.     c+=1
  20.  
  21.   return new_str
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement