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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:14:11+00:00 2026-06-05T20:14:11+00:00

I am a noob, How do I remove quotations and commas from my list?

  • 0

I am a noob,
How do I remove quotations and commas from my list? Or how do I “unstring”?

Without showing the dictionary (dic), the code I am using looks like this:

>>>import itertools
>>>list(itertools.product(dic[2], dic[3])

my results looks like this:

[('A', 'D'), ('A', 'E'), ('A', 'F'), ('B', 'D'), ('B', 'E'), ('B', 'F'), ('C', 'D'), ('C', 'E'), ('C', 'F')]

I would like them to look like this:

AD, AE, AF, BD, BE, BF,
  • 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-05T20:14:12+00:00Added an answer on June 5, 2026 at 8:14 pm

    You want to produce a string, so you can use string manipulation (in particular, the join method):

    >>> import itertools
    >>> a = ['A', 'B']
    >>> b = ['D', 'E', 'F']
    >>> print ', '.join(''.join(x) for x in itertools.product(a, b))
    AD, AE, AF, BD, BE, BF
    

    Actually you don’t even need itertools, you could just use a nested comprehension:

    >>> print ', '.join(x + y for x in a for y in b)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Noob question here! I have an array with hashes that looks like this: arr
I'm a complete Python noob. How can I remove two characters from the beginning
Noob question. I have an activate handler in a child List , but it
I've got a field in my xml that looks like this (some examples): <ViolationCharged>VTL0180
This sounds like a noob question for me but I need to ask it.
I feel like a real noob posting this, but I can't seem to find
I'm a noob to android development and i am trying to remove a string
I am a noob in using model/view paradigm in Qt and have the following
assuming, string1 = /var/usr/local/noob/ i need to start from the last character to the
Python noob... please be gentle. In my current program, I have a list of

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.