对于作业,我必须从以"W“和"Z”开头的文本中打印行,并以"n“和"t”结尾(所以W-n,W-t,Z-n,Z-t组合体)。我现在有一个代码可以工作,但它似乎有点长,我想知道是否有办法缩短它?("W") and line.endswith("n"): if line.startswith("W") and line.endswith(&q
nick = sender[0].Substring(1);//Person callin the bot as above{
if (i.StartsWith("+") && i.EndsWith(nick) || i.StartsWith("%") && i.EndsWith(nick) || i.StartsWith("@"