如何在python中找到位于所有这些字符中最右边的字符的位置?

2024-03-29 09:21:06 发布

您现在位置:Python中文网/ 问答频道 /正文

考虑下面的句子,我想找到最右边的"(双引号)在#之前,在这个例子中答案应该是?之后的双引号。如何在Python中解决它?你有什么好主意吗?你知道吗

print("Hello, world!", "Can you tell me the answer?") # this is a "comment"

Tags: the答案answeryouhelloworldthiscan