Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf9e8670

Browse files
str change to s like in question
1 parent14409d1 commitf9e8670

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎python/271-Encode-and-Decode-Strings.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ def encode(self, strs):
1818
defdecode(self,str):
1919
res,i= [],0
2020

21-
whilei<len(str):
21+
whilei<len(s):
2222
j=i
23-
whilestr[j]!="#":
23+
whiles[j]!="#":
2424
j+=1
25-
length=int(str[i:j])
26-
res.append(str[j+1 :j+1+length])
25+
length=int(s[i:j])
26+
res.append(s[j+1 :j+1+length])
2727
i=j+1+length
2828
returnres

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp