Listen to the passage and fill on the blanks with what you hear.[音频]Apple Inc. is one of 1. ______________________in the world, which was founded by Steve Jobs, Stephen Gary Wozniak, and Ronald Gerald Wayne on April 1, 1976. It grew rapidly and 2. _____________________ by developing innovative products such as the Mac, the iPod, the iPhone and the iPad, which changed 3. ________________________, entertainment and even the lives of millions of people. Apple products enjoyed wide recognition among end-users both for 4. _____________________ and their powerful applications.At Apple, innovation was a way of life and a part of its corporate DNA. Over the years, the company constantly innovated with its business model to respond to market needs and challenges and to deliver quality products and services. For 2006—2011, Apple was ranked No. 1 on the world’s 5. __________________________worked out by Business Week.According to experts, it was Steve Jobs’ vision of developing extraordinary products that made Apple 6. _____________________. His pursuit of innovation and his determination to change the world moved and shocked us. Unfortunately, on October 5, 2011, Jobs died of illness at the age of 56. Despite his death, Jobs’ spirit will stay forever in Apple.
下面代码的输出结果是:str1 = "k:1|k1:2|k2:3|k3:4"str_list = str1.split('|')d = { }for l in str_list:key,value = l.split(' : ')d[k] = valueprint(d)
A. [k:1, k1:2, k2:3, k3:4]
B. ['k':'1', 'k1':'2', 'k2':'3', 'k3':'4']
C. {'k':'1', 'k1':'2', 'k2':'3', 'k3':'4'}
D. 'k:1, k1:2, k2:3, k3:4'
执行如下代码:fname = input("请输入要写入的文件:")fo = open(fname, 'w')ls= ['清明时节雨纷纷,', '路上行人欲断魂,', '借问酒家何处有?', '牧童遥指杏花村。']fo.writelines(ls)fo.seek(0)for line in fo:print(line)fo.close()以下选项中错误的是:
A. 执行代码时,从键盘输入"清明.txt",则清明.txt被创建
B. fo.writes(ls)将元素全为字符串的ls列表写入文件
C. fo.seek(0)这行代码可以省略,不影响输出效果
D. 代码主要功能为向文件写入一个列表类型,并打印输出结果
要替换掉从csv文件里读出的一行字符串s的行尾标点和回车符,不能使用的选项是:
A. s.replace("\n", "")
B. s.strip("\n","")
C. s.replace("\n", "").replace("。", "")
D. s.replace("\n", "").split(",")