2021-05-05 17:13:49 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5e7b9f090b6c005b0e76f066
|
2021-07-02 13:15:29 +00:00
|
|
|
|
title: 字符串和列表
|
2021-05-05 17:13:49 +00:00
|
|
|
|
challengeType: 11
|
|
|
|
|
videoId: lxcFa7ldCi0
|
|
|
|
|
dashedName: strings-and-lists
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
2021-07-02 13:15:29 +00:00
|
|
|
|
更多資源:
|
2021-05-05 17:13:49 +00:00
|
|
|
|
|
2021-07-02 13:15:29 +00:00
|
|
|
|
\- [練習](https://www.youtube.com/watch?v=-9TfJF2dwHI)
|
2021-05-05 17:13:49 +00:00
|
|
|
|
|
|
|
|
|
# --question--
|
|
|
|
|
|
|
|
|
|
## --text--
|
|
|
|
|
|
2021-07-02 13:15:29 +00:00
|
|
|
|
在這個代碼中,n 等於什麼?
|
2021-05-05 17:13:49 +00:00
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
|
words = 'His e-mail is q-lar@freecodecamp.org'
|
|
|
|
|
pieces = words.split()
|
|
|
|
|
parts = pieces[3].split('-')
|
|
|
|
|
n = parts[1]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## --answers--
|
|
|
|
|
|
2021-07-02 13:15:29 +00:00
|
|
|
|
郵件
|
2021-05-05 17:13:49 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
q
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
lar
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
`lar@freecodecamp.org`
|
|
|
|
|
|
|
|
|
|
## --video-solution--
|
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|