越努力越幸运lucky
越努力越幸运lucky
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
越努力越幸运lucky的博客
全部文章
(共3篇)
题解 | #修正错误的字母#
str_old = input() str_new = str_old.replace('a*', 'ab') print(str_new)
2023-03-19
1
267
题解 | #单词造句#
word_list =[] while True: word = input("") if word != "0": word_list.append(word) else: break print(" ".join(word_list))
2023-03-19
0
250
题解 | #牛牛的字符菱形#
使用center函数。 center() 返回一个原字符串居中,并使用空格填充至长度 width 的新字符串 ``` python3 ```shape = input("") for i in range(1, 6, 2): print((shape * i).center(5)) for ...
Python3
2022-02-27
15
595