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 8137325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:04:53+00:00 2026-06-06T11:04:53+00:00

The answer to a question on multiple-value elements in a config file (which exactly

  • 0

The answer to a question on multiple-value elements in a config file (which exactly fits my needs) suggests to “unpack the string from the config”. I read the doc for unpacking arguments lists suggested in several places but I fail to understand how this relates to my problem.

I am sure this must be obvious: having a string str = "123,456", how can I transform it into the list [123,456] (the number of elements separated by a comma in the string may vary)

Thank you.

  • 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-06T11:04:55+00:00Added an answer on June 6, 2026 at 11:04 am

    Do you want a list of strings or a list of ints?

    If you just want a list of strings, it’s very simple:

    my_list = my_string.split(',')
    

    If you want to convert these to ints, you need:

    my_list = map(int, my_string.split(','))
    

    (Also, don’t use str as a variable name as it shadows the built-in str() function.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Referring second answer to question: How to convert from ASCII to Hex and vice
While trying to answer this question I found without () (which invokes C++ most
i took this code from a different question and my script file has more
Have seen multiple posts on this but I can't see any which answer my
Based on Darin's answer to my question Ho to display multiple checkbox selection based
I'm writing a module that has multiple questions users can chose to answer. Each
I am creating a faq panel for there can be multiple answers for question
To answer this question, you should be aware of what PINsentry is first, of
While trying to answer this question I found that the code int* p =
I've seen one question/answer with a result similar to what I'm looking for, but

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.