[1]a=[8,13,11,6,26,19,24]1)请输出列表a中的奇数项2)请输出列表a中的奇数 解:1) a=[8,13,11,6,26,19,24] print a[::2] Result:>>>[8, 11, 26, 24] 2) a = [8,13,11,6,26,19,24] b = [] for item in a: if item%2 !=0: b.append(item) else: continue print b Result:>>>[13, 1…
题目:请将text字符串中的数字取出,并输出成一个新的字符串 text = "aAsmr3 idd4bgs7Dlsf 9eAF" b = list(text) new_list = [] for i in b: ': new_list.append(i) new_str = "".join(new_list) print(new_str) 以下为知识点归纳: 字符串转列表 >>> text = "I love you" >…