NP49. 字符列表的长度
描述
输入描述
无输出描述
Python 解法, 执行用时: 10ms, 内存消耗: 2832KB, 提交时间: 2022-07-03
my_list = ['P', 'y', 't', 'h', 'o', 'n'] print('Here is the original list:') print(my_list) print(' ') print('The number that my_list has is:') print(len(my_list))
Python 解法, 执行用时: 10ms, 内存消耗: 2832KB, 提交时间: 2022-06-30
my_list = ['P', 'y', 't', 'h', 'o', 'n'] print 'Here is the original list:' print my_list print ' ' print 'The number that my_list has is:' print len(my_list)
Python 解法, 执行用时: 10ms, 内存消耗: 2836KB, 提交时间: 2022-06-15
my_list=['P','y','t','h','o',"n"] print('Here is the original list:') print(my_list) print("") print('The number that my_list has is:') print(len(my_list))
Python 解法, 执行用时: 10ms, 内存消耗: 2840KB, 提交时间: 2022-06-23
my_list = ['P','y','t','h','o','n'] print 'Here is the original list:','\n', my_list print '' print 'The number that my_list has is:','\n',len(my_list)
Python 解法, 执行用时: 10ms, 内存消耗: 2840KB, 提交时间: 2022-06-23
my_list=['P','y','t','h','o','n'] print ('Here is the original list:') print my_list print('') print ('The number that my_list has is:') print len(my_list)