Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
remove apostrophes in list
#1
Is there a way to remove apostrophes in list so that this:

a_list = ['mary', 'had', 'a', 'little', 'lamb']
becomes:

a_list = [mary, had, a, little, lamb]
Thank you
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Messages In This Thread
remove apostrophes in list - by sparkz_alot - Jul-21-2017, 02:41 PM
RE: remove apostrophes in list - by Bass - Jul-21-2017, 02:58 PM
RE: remove apostrophes in list - by nilamo - Jul-21-2017, 02:58 PM
RE: remove apostrophes in list - by sparkz_alot - Jul-21-2017, 04:01 PM
RE: remove apostrophes in list - by nilamo - Jul-21-2017, 05:41 PM
RE: remove apostrophes in list - by sparkz_alot - Jul-21-2017, 09:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  remove duplicates from dicts with list values wardancer84 27 853 May-27-2024, 04:54 PM
Last Post: wardancer84
  unable to remove all elements from list based on a condition sg_python 3 580 Jan-27-2024, 04:03 PM
Last Post: deanhystad
  Remove numbers from a list menator01 4 1,488 Nov-13-2022, 01:27 AM
Last Post: menator01
  Remove empty keys in a python list python_student 7 3,234 Jan-12-2022, 10:23 PM
Last Post: python_student
  Remove an item from a list contained in another item in python CompleteNewb 19 5,995 Nov-11-2021, 06:43 AM
Last Post: Gribouillis
  .remove() from a list - request for explanation InputOutput007 3 2,324 Jan-28-2021, 04:21 PM
Last Post: InputOutput007
  Remove double quotes from the list ? PythonDev 22 9,223 Nov-05-2020, 04:53 PM
Last Post: snippsat
  Remove specific elements from list with a pattern Xalagy 3 2,779 Oct-11-2020, 07:18 AM
Last Post: Xalagy
  How to remove dict from a list? Denial 7 3,123 Sep-28-2020, 02:40 PM
Last Post: perfringo
  Remove all \n from end of list items JackMack118 4 36,428 Dec-27-2019, 08:34 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020