Python
天一_1886
毕业于西北工业大学,硕士研究生,目前就职某大型知名外企,专注于云计算运维领域7年,VMware VCIX认证专家。
展开
-
字符串分隔-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 · 516 阅读 · 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 · 2313 阅读 · 0 评论 -
计算字符个数-Python实现-华为机试
Python实现: str1 = input() str2 = input() count = 0 for n in range(len(str1)): if str1[n].upper() == str2.upper(): count += 1 print(count)原创 2020-03-07 22:35:14 · 360 阅读 · 0 评论 -
字符串最后一个单词的长度-Python实现-华为机试
Python实现: str = input() str_ls = str.split( ) print (len(str_ls[-1]))原创 2020-03-07 22:23:06 · 225 阅读 · 0 评论