Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def noAlpha(s):
- #@param s: string
- #@return string
- new_str = ''
- for i in range(len(s)):
- if not s[i].isalpha():
- new_str+=s[i]
- return new_str
- def noAlpha1(s):
- #@param s: string
- #@return string
- new_str = ''
- c = 0
- while(c<len(s)):
- if not s[c].isalpha():
- new_str+=s[c]
- c+=1
- return new_str
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement