mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-06 23:28:29 +08:00
python代码不合适
This commit is contained in:
@ -288,16 +288,6 @@ func main(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
### python:
|
|
||||||
```Python
|
|
||||||
class Solution:
|
|
||||||
def change(self, s):
|
|
||||||
lst = list(s) # Python里面的string也是不可改的,所以也是需要额外空间的。空间复杂度:O(n)。
|
|
||||||
for i in range(len(lst)):
|
|
||||||
if lst[i].isdigit():
|
|
||||||
lst[i] = "number"
|
|
||||||
return ''.join(lst)
|
|
||||||
```
|
|
||||||
### JavaScript:
|
### JavaScript:
|
||||||
```js
|
```js
|
||||||
const readline = require("readline");
|
const readline = require("readline");
|
||||||
|
Reference in New Issue
Block a user