#422. python1-3天天
python1-3天天
题目描述
已知列表 fruit = ['apple', 'banana', 'orange']
输入格式
在列表末尾添加元素 'pear' 计算并输出列表的长度 把第 2 个元素修改为 'grape' 输出修改后的完整列表
输出格式
一行,一个整数,表示答案。
4
['apple','grape','orange','pear']
数据范围
的数据,
的数据,
的数据,,。
相关
在以下作业中:
已知列表 fruit = ['apple', 'banana', 'orange']
在列表末尾添加元素 'pear' 计算并输出列表的长度 把第 2 个元素修改为 'grape' 输出修改后的完整列表
一行,一个整数,表示答案。
4
['apple','grape','orange','pear']
30% 的数据,1≤n≤20
60% 的数据,1≤n≤1000
100% 的数据,1≤n≤100000,1≤c,ai≤20000。