就要上岸了的海豚很爱吃鸡腿
就要上岸了的海豚很爱吃鸡腿
全部文章
分类
归档
标签
去牛客网
登录
/
注册
就要上岸了的海豚很爱吃鸡腿的博客
全部文章
(共43篇)
题解 | #列表的最值运算#
# 写法不同,没什么本质上的区别,都是要转化成整数列表,再取值 # 方法一,两次转化成整数列表 # a = input().split() # b = [] # for i in a: # b.append(int(i)) # print(max(b), min(b), sep='\n')...
2023-01-28
0
276
题解 | #查字典#
dict1 = { "a": ["apple", "abandon", "ant"], "b": ["banana", "bee", "become"], "c": ["cat", "come"], "d": "down", } x = input() if x ==...
2023-01-28
0
234
题解 | #喜欢的颜色#
# 我第一次写的方法: # result_dict = {'Allen': ['red', 'blue', 'yellow'], 'Tom': ['green', 'white', 'blue'], 'Andy': ['black', 'pink']} # key_list = sorted(lis...
2023-01-28
0
282
题解 | #首都#
cities_dict = {'Beijing': {'Capital': 'China'}, 'Moscow': {'Capital': 'Russia'}, 'Paris': {'Capital': 'France'}} key_list = sorted(list(cities_dict.ke...
2023-01-28
0
239
题解 | #姓名与学号#
my_dict_1 = {'name': 'Niuniu', 'Student ID': 1} my_dict_2 = {'name': 'Niumei', 'Student ID': 2} my_dict_3 = {'name': 'Niu Ke Le', 'Student ID': 3} dic...
2023-01-28
0
243
题解 | #毕业生就业调查#
# survey_list = ['Niumei', 'Niu Ke Le', 'GURR', 'LOLO'] # result_dict = {'Niumei': 'Nowcoder', 'GURR': 'HUAWEI'} # key_list = list(result_dict.keys())...
2023-01-28
0
228
题解 | #遍历字典#
# 第一次自己写的,不记得dict.keys() 方法,用了 key in dict 方法 # operators_dict = {'<':'less than', '==':'equal'} # print('Here is the original dict:') # key_list =...
2023-01-28
0
285
题解 | #增加元组的长度#
tup1 = tuple(range(1, 6)) tup2 = tuple(range(6, 11)) tup3 = tup1 + tup2 # print(tup1) # print(len(tup1)) # print(tup3) # print(len(tup3)) print(tup1, ...
2023-01-28
0
192
题解 | #牛牛的矩阵相加#
matrix_list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] n = int(input()) for i in range(len(matrix_list)): for j in range(len(matrix_list[i])): ma...
2023-01-28
0
223
题解 | #格式化清单#
food = ['apple', 'ice cream', 'watermelon', 'chips', 'hotdogs', 'hotpot'] while len(food) > 0: food.pop() print(food)
2023-01-28
0
180
首页
上一页
1
2
3
4
5
下一页
末页