Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8005113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:07:53+00:00 2026-06-04T17:07:53+00:00

I have data (below) with three different delimiters (the first has a space to

  • 0

I have data (below) with three different delimiters (the first has a space to the number, the second 3 spaces to the number and the final column a space and then a tab to the number) and I want to be able to generate a list containing sequential values from each column.

 8000.5   16745     0.1257
 8001.0   16745     0.1242
 8001.5   16745     0.1565
 8002.0   16745     0.1595
 8002.5   16745     0.1093
 8003.0   16745     0.1644

I tried some stuff with re. after converting to a string to see if I could parse it this way but it seemed a little bit long-winded to convert and I was wondering if anyone knew a quicker way. Ideal output would be

list 1 = [8000.5, 8001.0, 8001.5 ...]
list 2 = [16745, 16745, 16745, ...]
list 3 = [0.1257, 0.1242, 0.1565, ...]

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T17:07:54+00:00Added an answer on June 4, 2026 at 5:07 pm

    Just use a .split(); it’ll take any amount of whitespace and split on that (ignoring leading and trailing whitespace altogether):

    >>> ex = ' 8000.5   16745     0.1257'
    >>> ex.split()
    ['8000.5', '16745', '0.1257']
    

    If you need floats instead of strings, simply apply float() to each value using map:

    >>> ex = ' 8000.5   16745     0.1257'
    >>> map(float, ex.split())
    [8000.5, 16745.0, 0.1257]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that has data like below(sorted by date) COL_A | COL_B
In the code below, I have the same function on three different events (focus,
I have data like below AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE Now there is a
i have data below from streaming: 'ID|20120206|080500|0000001|0|1|record1|END' 'ID|20120206|080500|0000002|0|1|record2|END' 'ID|20120206|080500|0000003|0|1|record3|END' and i want to process
I have data stored as below in an MS Access database: Date User 20090101
I have a data structure which is as given below: class File { public
I have a data that looks like this . And my code below simply
I have my entities as below. My data model enforces below and I cannot
I have to load the data shown in the below image into my database.
I have the code below : public class Anything { public int Data {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.