string s = "The path of the righteous man is beset on all sides by the inequities of the tyranny of evil man." + "blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness," + "for he is truly his brother's keeper and the finder of lost children." + "And i will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers." + "And you will know my name is the lord when i lay my vengeance upon thee.";
string s = @" The path of the righteous man is beset on all sides by the inequities of the tyranny of evil man. blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And i will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the lord when i lay my vengeance upon thee.";
在python中也是这样,只不过需要使用**’’’string’’’**这样3个引号进行包含。
1 2 3 4 5 6
# 缩进的空字符也会保存到字符串中 s = '''The path of the righteous man is beset on all sides by the inequities of the tyranny of evil man. blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And i will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the lord when i lay my vengeance upon thee.'''