用python代码回答我 He was so proud of his little girl. It was her very first day of school. He walked with her to school that day, And she held his hand all the way. They walked together quiet and sad, A little girl and her loving dad. -将这6行诗定义为一个宇符串(注意:换行符也是一个字符,最后一行后应有 换行) 提取字符串开头的13个字符; 一 提取第一个'school; -在前两行中每了个字符(step=3) 提取一个字符;(前两行的最后不包含换行符) 共有多少个'girl? 是不是以Any开头?是不是以her loving dad'结尾? -是不是只包含字母、数字而且非空? 将所有字母变成大写并输出
时间: 2023-05-17 09:02:40 浏览: 76
He was so proud of his little girl.
It was her very first day of school.
He walked with her to school that day,
And she held his hand all the way.
They walked together quiet and sad,
A little girl and her loving dad.
1. 宇符串为:
He was so proud of his little girl.\nIt was her very first day of school.\nHe walked with her to school that day,\nAnd she held his hand all the way.\nThey walked together quiet and sad,\nA little girl and her loving dad.\n
2. 提取字符串开头的13个字符:
He was so pro
3. 提取第一个'school:
school.
4. 在前两行中每了个字符(step=3)提取一个字符:
Hwsoouo ie
Iwhvrydyfs
共有2个'girl。
不是以Any开头。
是以her loving dad'结尾。
是,只包含字母、数字而且非空。
将所有字母变成大写并输出:
HE WAS SO PROUD OF HIS LITTLE GIRL.
IT WAS HER VERY FIRST DAY OF SCHOOL.
HE WALKED WITH HER TO SCHOOL THAT DAY,
AND SHE HELD HIS HAND ALL THE WAY.
THEY WALKED TOGETHER QUIET AND SAD,
A LITTLE GIRL AND HER LOVING DAD.