Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I split the output?
#1
Quick and easy question, I am sure. I am creating two lists and then taking one item from each list to create a separate list. When I run the program the output doesn't come out as two different items, only in one item. How do I split the output into two items? It outputs "ESPFender" right now and I want "ESP" "Fender". Thank you!

fave_guitars = ["ESP", "Breedlove", "Ibanez"]
bad_guitars = ["Gibson", "Fender", "Jackson"]

fave_and_least = fave_guitars[0] + bad_guitars[1]

print(fave_and_least)
Reply


Messages In This Thread
How do I split the output? - by AnunnakiKungFu - Feb-25-2021, 10:34 PM
RE: How do I split the output? - by bowlofred - Feb-25-2021, 11:05 PM
RE: How do I split the output? - by AnunnakiKungFu - Feb-25-2021, 11:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Why is there an output of None akbarza 1 490 Nov-27-2023, 02:53 PM
Last Post: deanhystad
  How to "tee" (=split) output to screen and into file? pstein 6 1,435 Jun-24-2023, 08:00 AM
Last Post: Gribouillis
  How to Split Output Audio on Text to Speech Code Base12 2 6,896 Aug-29-2020, 03:23 AM
Last Post: Base12
  [split] No Error, and No Output vishal2894 1 1,734 Jul-02-2019, 03:20 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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