Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
coding skill
#1
I have a map like:

0,15
1,14
2,0
3,1
4,12
5,6
6,4
7,2
8,8
9,13
10,3
11,7
12,9
13,10
14,11
15,5
To print that I am doing

def PrintValuesArray(su_array):
    for each in su_array:
        print ",".join(map(str, each))
However I only want the values and comma separated like:

I have tried

def PrintSuffixArray(su_array):
    for key, value in su_array:
        print ",".join(map(str, value))
but got

print ",".join(map(str, value)) TypeError: argument 2 to map() must support iteration

and also

def PrintSuffixArray(su_array):
    for key, value in su_array:
        print ",".join(map(str, value in su_array))
print ",".join(map(str, value in su_array)) TypeError: argument 2 to map() must support iteration

How to print result like

15, 14, 0, 1, 12, 6, 4, 2, 8, 13, 3, 7, 9, 10, 11, 5
Reply
 


Possibly Related Threads...
Thread Author Replies Views Last Post
  is it possible to learn coding fast? itsmynew 48 6,257 10-02-2018, 02:51 PM
Last Post: sleepy99
  Tracking coding tutorials somenewton 2 355 08-20-2018, 01:19 PM
Last Post: 0xd64732865984
  wsh coding gipollma 0 302 06-14-2018, 02:30 PM
Last Post: gipollma
  for java advance coding pm me hax0rf1r3 1 306 03-30-2018, 06:14 AM
Last Post: sleepy99
  Coding Batch i8blknaglets 13 2,831 03-21-2018, 10:43 AM
Last Post: 2404pawel



Users browsing this thread: 1 Guest(s)