已知:s = 'hello' ,ss ='python'
print(s[0])是______ 。
print(s[0])是______ 。
举一反三
- 已知:s = 'hello' ,ss ='python'<br/>print(s*3)结果是______ 。
- 写出并理解下列语句输出的结果s="hello"print(s[0])print(s[4])print(s[-1])print(s[0:3])print(s[0:4:2])print(s[:])print(s[:3])print(s[::-1])print(s[1:])
- 以下程序的输出结果是______ 。#include #include int main(void) { char s[10], sp[] = "HELLO"; strcpy(s, sp); s[0] = 'h'; s[6] = '!'; printf("%s\n", s); return 0;}
- 语句 s =["seashell","gold","pink","brown","purple","tomato"]print(s[4:])的输出结果是[br][/br]____。
- 给出如下代码<br/>s<br/>= 'Python is beautiful!'<br/>可以输出“python”的是 A: print(s[0:6]) B: print(s[0:6].lower()) C: print(s[–21:<br/>–14].lower) D: print(s[:–14])