Python Forum
function t split a string
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
function t split a string
#1
i just wrote a function to split a string into parts based on a list of delimiters used in sequence.

>>> splits('abcdefghijklm',['b','ef','ij'])
['a','cd','gh','klm']
i wrote this because i needed it in a big script i was making. did i waste my time doing this?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
function t split a string - by Skaperen - Apr-23-2019, 12:21 AM
RE: function t split a string - by Larz60+ - Apr-23-2019, 12:50 AM
RE: function t split a string - by Skaperen - Apr-23-2019, 06:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  passing a string to a function to be a f-string Skaperen 3 4,123 Nov-06-2020, 06:14 AM
Last Post: Gribouillis
  a function to look for dates in a string Skaperen 6 4,088 May-09-2020, 11:03 PM
Last Post: Skaperen
  f-string capability in a function Skaperen 8 5,851 Dec-26-2019, 03:19 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