字符串

s = 'x_amz_date'
# replace(old,new) 使用new替换old字符
new_s = s.replace('_','-')
print(new_s)
# >>> x-amz-date