阅读下列程序,程序输出的结果是______。()string = 'd:/python/test.html'for i in ':./': string.replace(i,'')print(string)
A: d:pythontest.html
B: d python test html
C: d:/python/test.html
D: dpythontesthtml
A: d:pythontest.html
B: d python test html
C: d:/python/test.html
D: dpythontesthtml
举一反三
- 请阅读下面的程序 class Test { private static String name; static { name = "World"; System.out.print (name); } public static void main(String[] args) { System.out.print("Hello"); Test test = new Test(); } } 下列选项中,程序运行结果是
- 以下程序执行结果是________。 string = ["PHP", "Python", "C", "C++", "Java"] for item in string: item_temp = item.lower() for i in range(len(item)): if item_temp[i] in 'aeiou': string.remove(item) break print(string) s = sorted(string, reverse = True) print(s)[/i]
- 有如下代码,则该程序运行时输出结果是。 class Test{ static int i=0; public void show() { i++; System.out.println(i); } } public class Demo { public static void main(String[] args) { Test test=new Test(); test.show(); } }
- 11. String test = “Test A. Test B. Test C.”; 12. // insert code here 13. String[] result = test.split(regex); Which regular expression inserted at line 12 will correctly split test into “Test A,” “Test B,” and “Test C”?() A: String regex = “”; B: String regex = “ “; C: String regex = “.*“. D: String regex = “\\s” E: String regex = “\\.\\s*”; F: String regex = “\\w[ \.] +“;
- 11. String test = “Test A. Test B. Test C.”; 12. // insert code here 13. String[] result = test.split(regex); Which regular expression inserted at line 12 will correctly split test into “Test A,” “Test B,” and “Test C”?() A: String regex = “”; B: String regex = “ “; C: String regex = “.*“. D: String regex = “\\s” E: String regex = “\\.\\s*”; F: String regex = “\\w[ \.] +“;