Coursera课程Python for everyone:chapter8
2016-02-17 11:13
357 查看
Chapter 8 Quiz
10 试题Collection variables pull multiple network documents together
Collection variables merge streams of output into a single stream
Collection variables can store multiple values in a single variable
Collection variables can only store a single value
def / return
foreach / in
try / except
for / in
print friends[2:1]
print friends['Sally']
print friends[3]
print friends[2]
b
banana
B
Nothing would print - the program fails with a traceback
[0]
Banana
print data.length()
print len(data)
print strlen(data)
print length(data)
print data.length
print data.Len
A boolean (true/false) value
A string
A list of integers
A list of characters
A list of words
[1, 2, 3]
15
21
[1, 2, 3, 4, 5, 6]
[4, 5, 6]
6
t[:]
t[12:3]
t[2:2]
t[1:3]
t[2:4]
pop()
index()
push()
add()
append()
forward()
Joseph
Sally
Glenn
friends
相关文章推荐
- SQL Server 作业批量停止
- SQL2008定时任务作业创建教程
- 作业
- OS的处理机调度层次-01
- Linux系统使用crontab命令实现计划任务
- 初来宝地
- CFG桩施工组织设计
- 求助啊有会做网页的进
- 苦恼~
- 哪位仁兄帮我编译以下程序阿?
- e路通电子传真(实现企业传真无纸化办公)beta版震撼发布
- [Oracle Client and Net Service]Oracle Client安装及Net Service的配置
- 利用OMS自带工具做Oracle增量备份与恢复
- 最美又最遥远的回忆
- 误打误撞进了这里
- 求高人帮忙呀
- 成功的部门经理一周速成(转载)
- 进程的问题
- 我要努力!!!
- 教出一个优秀的女儿