我有绳子text = "Fix me a meeting in 2 days"。我有一些话的清单meetingStrings。
"meet"在那里meetingStrings。因此,我必须通过开会来拆分案文。
所需输出:
2天内
meetingStrings = [
"appointment",
"meet",
"interview"
]
text = "Fix me a meeting in 2 days"
for x in meetingStrings:
if x in text.lower():
txt = text.split(x, 1)[1]
print(txt)
Run Code Online (Sandbox Code Playgroud)
这给出了输出:
在2天之内。
我正在尝试通过在 Heroku 上部署它来测试示例节点 js 应用程序。我使用 mlab 作为我的数据库云托管。
但不幸的是,我遇到了一些错误。这是 Heorku 的错误日志:
2018-07-21T16:43:00.394188+00:00 heroku[web.1]: State changed from crashed to starting
2018-07-21T16:43:03.124528+00:00 heroku[web.1]: Starting process with command `npm start`
2018-07-21T16:43:06.239097+00:00 app[web.1]:
2018-07-21T16:43:06.239139+00:00 app[web.1]: > quizgiri@1.0.0 start /app
2018-07-21T16:43:06.239141+00:00 app[web.1]: > node app.js
2018-07-21T16:43:06.239142+00:00 app[web.1]:
2018-07-21T16:43:08.063152+00:00 app[web.1]: listening on port 3000 ......
2018-07-21T16:44:03.476862+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-07-21T16:44:03.476977+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-07-21T16:44:03.631909+00:00 heroku[web.1]: Process exited with status 137 …Run Code Online (Sandbox Code Playgroud) deployment ×1
heroku ×1
mlab ×1
node.js ×1
python ×1
python-3.x ×1
regex ×1
split ×1
string ×1