字符串
- 替换函数
s = 'x_amz_date'
# replace(old,new) 使用new替换old字符
new_s = s.replace('_','-')
print(new_s)
# >>> x-amz-date
s = 'x_amz_date'
# replace(old,new) 使用new替换old字符
new_s = s.replace('_','-')
print(new_s)
# >>> x-amz-date
From here you can search these documents. Enter your search terms below.
| Keys | Action |
|---|---|
| ? | Open this help |
| n | Next page |
| p | Previous page |
| s | Search |