We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 26879bf + 39c86dc commit 68c0b06Copy full SHA for 68c0b06
python/0271-encode-and-decode-strings.py
@@ -1,6 +1,6 @@
1
class Codec:
2
def encode(self, strs):
3
- return ''.join(map(lambda s: str(len(s)) + '#' + s, strs))
+ return ''.join(map(lambda s: f"{len(s)}#{s}", strs))
4
5
def decode(self, s):
6
res = []
0 commit comments