Contact: aviboots(AT)netvision.net.il
39,851 questions
51,772 answers
573 users
lst = [' python', 'c', ' c++', None, 'javascript', ' java', "c#", "swift", None] lst = [str(x.strip()) if x is not None else '' for x in lst] print(lst) ''' run: ['python', 'c', 'c++', '', 'javascript', 'java', 'c#', 'swift', ''] '''