Python Forum
join elements from two splits
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
join elements from two splits
#1
I want to join two splitted string,

a = "a,b,c"
b = "1,2,3"

spla = a.split(",")
splb = b.split(",")
for arra, arrb in spla, splb:
  print(arra + "-" + arrb)
what I get is

Error:
Traceback (most recent call last): File "python", line 6, in <module> ValueError: too many values to unpack (expected 2)
help to get rid this.,
thank you in advance!
Reply


Messages In This Thread
join elements from two splits - by dwiga - Sep-08-2017, 03:24 AM
RE: join elements from two splits - by wavic - Sep-08-2017, 06:55 AM
RE: join elements from two splits - by nilamo - Sep-29-2017, 09:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  String Splits m.zod 3 5,141 Oct-05-2016, 08:14 PM
Last Post: wavic

Forum Jump:

User Panel Messages

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