modify previous solutions to only strip newline character from line
This commit is contained in:
parent
9af9a726b4
commit
d58a672aa5
@ -2,7 +2,7 @@ import re
|
||||
import sys
|
||||
|
||||
for line in sys.stdin:
|
||||
line = line.strip()
|
||||
line = line.strip('\n')
|
||||
if re.match(r'^-?[1-9][0-9]*0$|^-?[1-9][0-9]*5$|^0$', line):
|
||||
print('yes')
|
||||
else:
|
||||
|
@ -16,7 +16,7 @@ def get_number(c):
|
||||
return result
|
||||
|
||||
for line in sys.stdin:
|
||||
line = line.strip()
|
||||
line = line.strip('\n')
|
||||
if not re.match(pattern, line):
|
||||
print('no')
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user