Skip to content

Commit 68c0b06

Browse files
authored
Merge pull request #2968 from coopers/0271
Update 0271-encode-and-decode-strings.py
2 parents 26879bf + 39c86dc commit 68c0b06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/0271-encode-and-decode-strings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class Codec:
22
def encode(self, strs):
3-
return ''.join(map(lambda s: str(len(s)) + '#' + s, strs))
3+
return ''.join(map(lambda s: f"{len(s)}#{s}", strs))
44

55
def decode(self, s):
66
res = []

0 commit comments

Comments
 (0)