#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Author:Sayiod L1 = ['Hello', 'World', 18, 'Apple', None] L2 = [i for i in L1 if isinstance(i, str)] print(L1) print(L2)
Sign in to make a reply
Sayiod