- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 字符串分隔-Python实现-华为机试
Python实现:str1 = input()str2 = input()def splitchar(string): if len(string) <= 8: print(string.ljust(8,'0')) else: while len(string) > 8: print(string[:8]...
2020-03-07 22:44:00 520 1
原创 明明的随机数-Python实现-华为机试
Python实现:while True: try: n = int(input()) sample = set() for i in range(n): sample.add(int(input())) for m in sorted(sample): print(m) ...
2020-03-07 22:41:20 2324
原创 计算字符个数-Python实现-华为机试
Python实现:str1 = input()str2 = input()count = 0for n in range(len(str1)): if str1[n].upper() == str2.upper(): count += 1print(count)
2020-03-07 22:35:14 362
原创 字符串最后一个单词的长度-Python实现-华为机试
Python实现:str = input()str_ls = str.split( )print (len(str_ls[-1]))
2020-03-07 22:23:06 228
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人