Python Forum
Removing punctuation from strings in lists
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Removing punctuation from strings in lists
#2
newlines = []
for item in lines:
   newlines.append(item.strip(','))
lines = newlines
Reply


Messages In This Thread
RE: Removing punctuation from strings in lists - by Larz60+ - May-21-2017, 04:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to understand strings and lists of strings Konstantin23 2 908 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  Splitting strings in list of strings jesse68 3 1,901 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  Split dict of lists into smaller dicts of lists. pcs3rd 3 2,543 Sep-19-2020, 09:12 AM
Last Post: ibreeden
  string.punctuation for languages like French or German Leo978 1 2,394 Jun-06-2020, 09:09 AM
Last Post: DeaD_EyE
  Where does string.punctuation come from? Mark17 5 3,099 Sep-16-2019, 04:42 PM
Last Post: Mark17
  Finding multiple strings between the two same strings Slither 1 2,612 Jun-05-2019, 09:02 PM
Last Post: Yoriz
  sort lists of lists with multiple criteria: similar values need to be treated equal stillsen 2 3,427 Mar-20-2019, 08:01 PM
Last Post: stillsen
  lists, strings, and byte strings Skaperen 2 4,327 Mar-02-2018, 02:12 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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