Python Forum
Quickest way of splitting a string
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quickest way of splitting a string
#1
Hi,

I have a string with the following format: 'bbb 3 3', i.e a string and 2 numbers.
I need the 3 data, and i am using str.split() to get that result. The problem is it is a bit slow. Is there a quicker way to extract the same information, using regex or any other method?

Thank you very much for your help
Reply


Messages In This Thread
Quickest way of splitting a string - by yanhto - May-01-2018, 11:27 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using a function: splitting, joining, and slicing a string Drone4four 2 4,895 Dec-27-2018, 07:52 AM
Last Post: perfringo
  [split] Splitting a string into six pieces susmis666 1 2,244 Dec-25-2018, 06:16 PM
Last Post: ichabod801
  Splitting A String In Python Saif133 6 6,469 Jan-14-2017, 04:09 AM
Last Post: Saif133

Forum Jump:

User Panel Messages

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