删除逗号或撇号前面的白色 space - Python

remove white space in front of comma or apostrophe - Python

如何删除撇号或逗号前的白色 space 以便 print() 中的句子读起来更好?

CTyear = 2020
Name1 = "Dave"
print("Hello",Name1,",","its the year",CTyear,".")

“你好戴夫,现在是 2020 年。”<- 我如何删除撇号和逗号前面的白色 space?谢谢

使用字符串格式:

CTyear = 2020
Name1 = "Dave"
print(f"Hello {Name1}, it's the year {CTyear}.")

输出

Hello Dave, it's the year 2020.