Francesco-_-

problema 1

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