码农后端
码农后端
全部文章
分类
归档
标签
去牛客网
登录
/
注册
码农后端的博客
全部文章
(共57篇)
题解 | #数学幂运算#
x,y=map(int,input().split()) print(x**y,y**x,sep='\n')
2022-08-26
3
380
题解 | #数字的十六进制#
print(hex(int(input())))
2022-08-26
0
194
题解 | #使用字典计数#
letter=input() ls=[] ls1=[] for i in letter: ls.append(i) for j in ls: l...
Python3
2022-08-26
0
221
题解 | #字典新增#
my_dict={'a': ['apple', 'abandon', 'ant'], 'b': ['banana', 'bee', 'become'], 'c': ['cat', 'come'], 'd': 'down'} letter=input() word=input() my_dict[le...
Python3
2022-08-25
11
742
题解 | #查字典#
my_dict={'a': ['apple', 'abandon', 'ant'], 'b': ['banana', 'bee', 'become'], 'c': ['cat', 'come'], 'd': 'down'} n=input() for i in my_dict:  ...
Python3
2022-08-25
0
288
题解 | #生成字典#
n=input().split() l=input().split() print(dict(zip(n,l))) zip() 函数:用于将可迭代的对象(字典,列表,元组,集合,字符串等)作为参数,将对象中对应的元素打包成一个个元组,然后返回由这些元组组成的列表。最后用d = dict(z...
Python3
2022-08-25
0
269
题解 | #喜欢的颜色#
1.代码如下: result_dict={'Allen': ['red', 'blue', 'yellow'],'Tom': ['green', 'white', 'blue'],'Andy': ['black', 'pink']} for i in sorted(result_dict):...
Python3
2022-08-25
0
263
题解 | #首都#
cities_dict={'Beijing': {'Capital': 'China'}, 'Moscow': {'Capital': 'Russia'}, 'Paris': {'Capital': 'France'}} for i in sorted(cities_dict): &n...
Python3
2022-08-24
0
204
题解 | #姓名与学号#
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} dict_list=[]...
Python3
2022-08-24
2
381
题解 | #毕业生就业调查#
survey_list=['Niumei', 'Niu Ke Le', 'GURR', 'LOLO'] result_dict={'Niumei': 'Nowcoder','GURR': 'HUAWEI'} for i in survey_list: if i in...
Python3
2022-08-24
0
246
首页
上一页
1
2
3
4
5
6
下一页
末页