小册名称:Python合辑4-130个字符串操作示例
如何用Python中的一个字符替换字符串中的所有字符
test = 'canada'print('$' * len(test))
test = 'canada'
print('$' * len(test))
Output:
$$$$$$