AttributeError:“str”对象没有“sub”Python cod属性

2024-05-29 11:22:00 发布

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

在为即将到来的期末考试而努力学习时遇到这个错误,需要理解它为什么不起作用。这是密码。

morning_agenda = "At 9.00AM the project team will assemble. The first topic will be fixing the bug in program product.py. We'll break for coffee at 10.30. Work will then continue on improving display.html until 12.30PM."

print morning_agenda

morning_agenda.sub('([0-9]+)\.([0-9]+)', r'\1:\2', morning_agenda)

print morning_agenda

Tags: theproject密码错误amwillteamat

热门问题