7.列表guests=[“萧峰”,”杨过”,”令狐冲”,”张无忌”,”郭靖”],下列选项正确的是( )。
A: guests[2]的值为’杨过’
B: guests[3]的值为’张无忌’
C: guests[-5]的值为’郭靖’
D: guests[-4]的值为’萧峰’
A: guests[2]的值为’杨过’
B: guests[3]的值为’张无忌’
C: guests[-5]的值为’郭靖’
D: guests[-4]的值为’萧峰’
举一反三
- 列表guests=["萧峰","杨过","令狐冲","张无忌","郭靖"],下列删除"张无忌"的方法,哪种是错误的?( ) A: del.remove[3] B: guests.remove[3] C: guests.pop(3) D: guests.remove["张无忌"]
- 已知guest=["萧峰","杨过","令狐冲","张无忌","郭靖"],要想获取郭靖的值,如何表示? A: x[5] B: x[1] C: x[-1] D: x[0]
- 下列金庸作品,“男一号”有失恋经历的是( )。 A: 令狐冲 B: 萧峰 C: 郭靖 D: 张无忌
- 下面哪条命令可以将“tx”用户的主要群组设置为“guests” A: usermod -g guests tx B: usermod -G guests tx C: gpasswd -a tx guests D: gpasswd -M tx guests
- It was too cold_________outside. A: the guests eating B: the guests to eat C: for the guests to eat D: that the guests eat