From 77a3a7c5f0e56b42f617147aa65b2948c6b392a6 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Mon, 21 Oct 2024 09:53:54 +0800 Subject: [PATCH] update --- src/learn/03/index.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/learn/03/index.md b/src/learn/03/index.md index 6fda1d7..bbfa67c 100644 --- a/src/learn/03/index.md +++ b/src/learn/03/index.md @@ -1,5 +1,15 @@ 遇到以下情况: +## 输入的文字,用空格隔开。比如:你好 世界 + +你输入的`"你好 世界"`是一句话,但是你需要得到 `"你好"` 和 `"世界"`,并分别赋值给两个变量a和b。 + +你需要这样写: + +```py +a, b = input().split() +``` + ## 输入两个整数,用空格隔开。比如:10 20 写法如下: