《笨方法学 Python 3》14.提示和传递

基础练习: #导入模块(参数变量) from sys import argv #解包,赋值 script, user_name = argv #赋值 prompt = '> ' #打印,格式化字符串(下同) print(f"Hi {user_name}, I'm the {script} script.") print("I'd like to ask you a few questions."
相关文章
相关标签/搜索