Advertisement
valerio_mazza

remove_alpha/digit

Nov 15th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. def remove_alpha(seqch):
  2. # @param seqch: String
  3. # return string
  4.   new_string = ""
  5.   for s in seqch:  
  6.     if not s.isalpha():
  7.       new_string = new_string + s
  8.   return new_string
  9.  
  10. def remove_digit(seqch):
  11. # @param seqch: String
  12. # return string
  13.   new_string = ""
  14.   for s in seqch:  
  15.     if not s.isdigit():
  16.       new_string = new_string + s
  17.   return new_string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement