Python Forum
Accessing data in zip - Index out of range
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing data in zip - Index out of range
#3
or you can use itertools.product

from itertools import product
names=["Jack", "Jeni", "Monsa", "Mehus", "Kuis", "Tim", "Tony", "Yestgf", "Pere"]
for two_names in product(names, names):
    print(' '.join(two_names))
Reply


Messages In This Thread
RE: Accessing data in zip - Index out of range - by buran - Mar-03-2018, 07:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to fix list index out of range longmen 26 6,067 Apr-27-2022, 05:46 PM
Last Post: deanhystad
  list index out of range OliverG 3 2,353 Sep-03-2021, 12:04 AM
Last Post: itsmycode
  List index out of range when turning CSV into dict ranbarr 15 6,493 May-12-2021, 10:38 AM
Last Post: ranbarr
  list index out of range mcgrim 2 2,922 May-25-2019, 07:44 PM
Last Post: mcgrim
  IndexError: list index out of range abdullahali 4 3,879 Jan-17-2019, 07:54 AM
Last Post: buran
  String index out of range felie04 2 5,549 Aug-17-2018, 11:18 PM
Last Post: felie04
  "List index out of range" for output values pegn305 3 5,318 Nov-26-2017, 02:20 PM
Last Post: heiner55
  list index out of range DrPengin 1 3,702 Nov-09-2017, 08:35 PM
Last Post: gruntfutuk
  string index out of range cusick11 9 15,153 Mar-03-2017, 11:45 PM
Last Post: ichabod801
  Invalid syntax: string index out of range darkreaper1959 6 6,184 Jan-22-2017, 06:24 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