Apr-13-2020, 12:25 PM
Another way without any datatype conversion:
j = [2,5] k = [4,6] e = [7,8] r = [9,1] print('The numbers you have selected are', end=' ') print(*j, *k, *e, *r, sep=', ')If one will run this file output will be:
Output:The numbers you have selected are 2, 5, 4, 6, 7, 8, 9, 1
If order is not important and you want things more 'human-readable' then you can sort them as well:print('The numbers you have selected are', end=' ') print(*sorted([*j, *k, *e, *r]), sep=', ')This will output:
Output:The numbers you have selected are 1, 2, 4, 5, 6, 7, 8, 9
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.