一些詳細解釋使用Java,我可以分割字符串,並給出一些詳細的解釋製作在Python字符串
String x = "a" + // First
"b" + // Second
"c"; // Third
// x = "abc"
我怎樣才能使蟒蛇等價?
我可以拆分字符串,但我無法對此進行評論,就像我對Java所做的一樣。
x = "a" \
"b" \
"c"
我需要此功能來解釋正則表達式的用法。
Pattern p = Pattern.compile("rename_method\\(" + // ignore 'rename_method('
"\"([^\"]*)\"," + // find '"....",'
要註釋的正則表達式,考慮're.VERBOSE'標誌:http://docs.python.org/library /re.html#re.VERBOSE –