st = "abXabXAbX"
ch = "A"
st = st.lower()
ch = ch.lower()
for i in st:
if (i==ch):
print st.find(i)
我想在字符串「st」中將字符「ch」以大寫和小寫的方式進行定位。 for循環在檢測到第一個「a」時陷入困境,如何讓循環移動來檢查字符串的其餘部分?
我正在嘗試爲了調試目的而通過發佈scrapy抓取輸出列表。 這裏是我的代碼: post_list = []
with open('last_crawl_output.txt','r') as f:
crawl_output = f.read()
# Find first 'referer' that indicates start of scrapy crawl AFTER in