You typed wrong, but the way you typed in your message is correct, try again!
>>> ["ma%d" % n for n in range(2, 5)]
['ma2', 'ma3', 'ma4']
(If you copy code to message push first (CODE) or paint the code and push it afterwards.)
You are expecting also wrong result, here is generic way to do your result, but the output is different:
m = 'ma'
print(tuple('%s%s' % combination for combination in itertools.product(list1, m)))
""" Output (not what you expected, but logically correct):
('2m', '2a', '3m', '3a', '4m', '4a')
Edited 3 Years Ago by mike_2000_17: Fixed formatting
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...