Skip to content

Commit 8061d16

Browse files
committed
Improved strings
1 parent 792157c commit 8061d16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

03.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
if __name__ == '__main__':
55
small_letter = re.compile('[^A-Z]+(?P<bodyguards1>[A-Z]{3})(?P<small_letter>[a-z])(?P<bodyguards2>[A-Z]{3})[^A-Z]+', re.UNICODE)
6-
result = ''
6+
result = ""
77

88
try:
99
f = open('03_text.txt', 'r')
@@ -12,7 +12,7 @@
1212
match = small_letter.search(line)
1313

1414
if match:
15-
result = '{0}{1}'.format(result, match.group('small_letter'))
15+
result = "%s%s" % (result, match.group("small_letter"))
1616

1717
f.close()
1818
print(result)

0 commit comments

Comments
 (0)