Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. 10,5 would return true
  2. 10 would return true
  3. 9,3 would return false
  4. 9,5 would return true
  5.  
  6. import re
  7. def int_or_comma_5(n):
  8. return re.match('d+(,5)?$',n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement