With Java, I can split the string and give some detailed explanations
String x = "a" + // First
"b" + // Second
"c"; // Third
// x = "abc"
How can I make the equivalence in python?
I could split the string, but I can’t make a comment on this like I do with Java.
x = "a" \
"b" \
"c"
I need this feature for explaining regular expression usage.
Pattern p = Pattern.compile("rename_method\\(" + // ignore 'rename_method('
"\"([^\"]*)\"," + // find '"....",'
This
will work.
The magic is done here by the parenthesis — python automatically continues lines inside of any unterminated brakets (
([{). Note that python also automatically concatenates strings when they’re placed next to each other (We don’t even need the+operator!)– really cool.