Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
merging two csv files
#2
The zip function should give you what you want:

for row in zip(["A","B","C","D"],["1","2","3","4"],["Monday","Tuesday","Wednesday","Thursday"]):
     print(row)
Output:
('A', '1', 'Monday') ('B', '2', 'Tuesday') ('C', '3', 'Wednesday') ('D', '4', 'Thursday')
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
merging two csv files - by jlcolam - Jul-13-2017, 11:05 AM
RE: merging two csv files - by ichabod801 - Jul-13-2017, 12:55 PM
RE: merging two csv files - by jlcolam - Jul-13-2017, 01:45 PM
RE: merging two csv files - by ichabod801 - Jul-13-2017, 06:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Merging multiple csv files with same X,Y,Z in each Auz_Pete 3 1,306 Feb-21-2023, 04:21 AM
Last Post: Auz_Pete
  Help needed with merging two CSV files eyadfr 5 3,107 Dec-14-2021, 07:34 PM
Last Post: paul18fr
  Sorting and Merging text-files [SOLVED] AlphaInc 10 5,109 Aug-20-2021, 05:42 PM
Last Post: snippsat
  Merging all file_name.log's files from directory to one and search “PerformanceINFO" sutra 0 1,827 Dec-09-2020, 05:14 PM
Last Post: sutra
  Merging Excel Files JezMim 1 1,964 Sep-06-2020, 08:56 PM
Last Post: bowlofred
  Merging CSV Files in Jupyter RJ117 0 4,824 Jan-07-2018, 06:24 AM
Last Post: RJ117

Forum Jump:

User Panel Messages

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