以下程序输出到文件text.csv里的结果是: fo=open("text.csv",'w') x=[90,87,93] fo.write(",".join(str(x))) fo.close()
A: [90,87,93]
B: 90,87,93
C: ,9,0,,,,8,7,,,,9,3,
D: [,9,0,,,,8,7,,,,9,3,]
A: [90,87,93]
B: 90,87,93
C: ,9,0,,,,8,7,,,,9,3,
D: [,9,0,,,,8,7,,,,9,3,]
举一反三
- 以下程序输出的文件中,内容为()fo = open("text.csv", 'w') x = [ [90, 87, 93], [87, 90, 89], [78, 98, 97]] b = [] for a in x: for aa in a: b.append(str(aa)) fo.write(",".join(b)) fo.close() A: 90,87,93,87,90,89,78,98,97 B: [[90,87,93],[87,90,89],[78,98,97]] C: [90,87,93,87,90,89,78,98,97] D: 90,87,93 87,90,89 78,98,97
- 以下程序输出到文件textcsv里的结果是: fo=open(“textcsv”,‘w’) x=[90,87,93] z=[] foryinx: z.append(str(y)) fo.write(","join(z)) fo.close() A: [90,87,93] B: 90,87,93 C: ‘[90,87,93]’ D: ‘90,87,93’
- 以下程序输出到文件textcsv里的结果是: fo = open(“textcsv”,‘w’) x = [90,87,93] z = [] for y in x: z.append(str(y)) fo.write(","join(z)) fo.close()
- 以下程序输出到文件text.csv里的结果是______。 fo=open("a.txt",'w') x=['春眠','处处','夜来'] fo.writelines(x) fo.close() A: '春眠''处处''夜来' B: 春眠处处夜来 C: 春眠 处处 夜来 D: 春眠' '处处' '夜来'
- 以下程序的输出结果是: frame = [[1,2,3],[4,5,6],[7,8,9]] rgb = frame[::-1] print(rgb) A: [[7, 8, 9]] B: [[1,2,3],[4,5,6],[7,8,9]] C: [[7, 8, 9], [4, 5, 6], [1, 2, 3]] D: [[1, 2, 3], [4, 5, 6]]