请用代码实现: a. 利用下划线将列表的每一个元素拼接成字符串,li = "alexericrain" 运行结果: a_l_e_x_e_r_i_c_r_a_i_n b. 利用下划线将列表的每一个元素拼接成字符串,li = ['alex', 'eric', 'rain'] (可选) 运行结果: ale ...
分类:
编程语言 时间:
2018-05-31 19:13:24
阅读次数:
263
#1:name = input('请输入你的身份')if name == 'egon': print('--> 超级管理员')elif name == 'tom': print('--> 普通管理员')elif name == 'jack,rain': print('--> 业务主管')elif n ...
分类:
编程语言 时间:
2018-05-29 20:36:55
阅读次数:
173
20、字符串是否可迭代?如可以请使用for循环每一个元素? >>> name = " aleX ">>> for i in name:... print(i) 21、请代码实现:利用下划线将列表的每一个元素拼接成字符串,li = ['alex','eric','rain'] 22、写代码,有如下列表 ...
分类:
编程语言 时间:
2018-05-24 12:01:57
阅读次数:
732
一种字典形式储存数据的方式 import datetime, shelve d = shelve.open('shelve_test.txt') info = {'age':22, 'job':'it') name = ['alex', 'rain', 'test'] d['name'] = nam ...
分类:
其他好文 时间:
2018-05-23 13:04:33
阅读次数:
162
On an N x N grid, each square grid[i][j] represents the elevation at that point (i,j). Now rain starts to fall. At time t, the depth of the water ever ...
分类:
其他好文 时间:
2018-05-10 00:01:21
阅读次数:
476
题目:接雨水 难度:hard 题目内容: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able t ...
分类:
移动开发 时间:
2018-05-08 00:52:22
阅读次数:
264
1,写代码,有如下列表,按照要求实现每一个功能li = ['alex', 'wusir', 'eric', 'rain', 'alex'] 计算列表的长度并输出print(len(li))答:结果为5 列表中追加元素'seven',并输出添加后的列表li.append('seven')print(l ...
分类:
编程语言 时间:
2018-04-28 22:16:31
阅读次数:
201
今天在b站看到有人弹奏秦基博的《Rain》,就想起了高中时候听的他的《透明的世界》。那是我用作QQ空间背景音乐时间最长的一首,也是我最喜欢的那段火影的OP。 以死宅自称的我,一切的一切起源于初一时候借的室友的火影漫画书。那时候,火影漫画的剧情刚到佩恩入侵木叶村。还记得是抱着那几本漫画书,每天晚上打着 ...
分类:
其他好文 时间:
2018-04-16 14:41:56
阅读次数:
164
1、请用代码实现:利用下划线将列表的每一个元素拼接成字符串,li=['alex','eric','rain'] 1 li = ['alex','eric','rain'] 2 a = '_'.join(li) 3 print(a) 2、查找列表中元素,移除每个元素的空格,并查找以a或A开头并且以c结 ...
分类:
其他好文 时间:
2018-03-30 01:11:32
阅读次数:
862
【题目描述】 Given n x m non-negative integers representing an elevation map 2d where the area of each cell is 1x1, compute how much water it is able to tra ...
分类:
移动开发 时间:
2018-03-28 01:33:05
阅读次数:
205