+ 1
Help with Python output
• Output needed: https://code.sololearn.com/cd2smdqDPXIk • This is my attempt. I'm looking for alternative methods to do it: l = "ABCD" for i in l: for j in l: if i == j or i <= j print(i, j)
2 Antworten
+ 2
from itertools import combinations_with_replacement as comb
for pair in comb("ABCD",2):
print(pair)
0
That's terrific.. Thank you for your interest.