单选题

假设变量 string 中存储着一个字符串"编程竞赛",下面哪段代码可以获得 string 从右到左的第三个字符呢?

A

string[3]

B

string[-3]

C

string[:-3]

D

string[0:-3]

赣ICP备20007335号-2