《笨方法學 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."
相關文章
相關標籤/搜索