我有一個像這樣的變量:ignore = val1,val2如何使用逗號分隔變量?
但我不清楚如何將這些值作爲單獨的值使用。
目前(以我所知)我需要硬編碼他們像下面的代碼:
if (not Path.find("val1") > -1) and (not Path.find("val2") > -1):
etc
現在我想測試添加到它,並再次我需要這樣的硬編碼:
if (not Path.find("val1") > -1) and (not Path.find("val2") > -1) and (not Path.find("test") > -1):
難道還有更好的方法嗎?
你能否提供關於'Path'和Path.find是什麼的更多細節? – georg