利用集合的元素不可重复性 摘要:解题思路:注意事项:参考代码:x=input()a=list(x.split())b=set()for i in a: b.add(i)print(len(b))…… 题解列表 2022年04月06日 0 点赞 0 评论 494 浏览 评分:0.0
[编程入门]带参数宏定义练习(暴力解法,超级容易学会) 摘要:解题思路:注意事项:参考代码思路:直接一行输入多个并逆序即为交换x=list(map(int,input().split())) x=x[::-1] for i in x: print(…… 题解列表 2022年04月06日 0 点赞 0 评论 826 浏览 评分:9.9
[编程入门]自定义函数之字符类型统计(超级容易理解 特别适合新手理解) 摘要:解题思路:注意事项:参考代码:第一种自定义函数方式:def person_pratice(n): ans=0#判断字母 包括大小写 result=0#判断数字 space…… 题解列表 2022年04月06日 0 点赞 1 评论 711 浏览 评分:8.0
自定义函数之数字分离(适合新手理解) 摘要:解题思路:注意事项:参考代码:注意事项:一定要注意格式 和审题def person_pratice(n): for i in str(n): print(int(i),en…… 题解列表 2022年04月06日 0 点赞 0 评论 478 浏览 评分:9.9
全网最容易理解(自定义函数之字符提取) 摘要:解题思路:注意事项:参考代码:def person_pratice(n): s=['a','e','i','o','u…… 题解列表 2022年04月06日 0 点赞 0 评论 407 浏览 评分:9.0
将原有列表拆分为两个列表,将其中一个列表更换次序直到与原来相同,与另外一个列表进行比较 摘要:解题思路:注意事项:参考代码:while True: a=list(map(int,input().split())) x=a[0] a=a[1:] xx=a[0:x] …… 题解列表 2022年04月06日 0 点赞 0 评论 459 浏览 评分:8.0
非常容易理解(自定义函数之字符串连接) 摘要:解题思路:注意事项:参考代码:def person(h,s):#输入的参数 h=h+s#拼接字符串 print(h) #类型都为字符串 h=input() s=inp…… 题解列表 2022年04月06日 0 点赞 0 评论 1071 浏览 评分:9.9
最简单(自定义函数之字符串反转) 摘要:解题思路:注意事项:参考代码:错误思路:对字符串进行降序正确思路:对字符串进行逆序操作def person(n): print(n[::-1]) n=input() person(n)…… 题解列表 2022年04月06日 0 点赞 0 评论 588 浏览 评分:9.9
python-摆花摆花 摘要:解题思路:注意事项:参考代码:def f(n,m): num = [0] + [int(i) for i in input().strip().split()] dp = …… 题解列表 2022年04月06日 0 点赞 0 评论 487 浏览 评分:9.9
1行代码直接ac 摘要:解题思路:注意事项:参考代码 : while True: print(sum([int(i) for i in input()]))…… 题解列表 2022年04月06日 0 点赞 0 评论 418 浏览 评分:0.0