Discuss / Python / 交作业

交作业

Topic source

徐轲l

#1 Created at ... [Delete] [Delete and Lock User]

L1 = ['Hello', 'World', 18, 'Apple', None]

x=0

L3=[]

while x<5:

    if isinstance(L1[x],str)==True:

        L3.append(L1[x])

    x=x+1

L2=[n.lower() for n in L3]


  • 1

Reply