Why does this Python cast behave differently for map and without map

Viewed 68

Why do these two print statements produce different outcomes when the two casts from int to string appear to do the same thing ? What am I missing ?

board is a list of integers

#ex.1
print ' '.join(map(str, board[:3]))
#ex.2
print ' '.join(str(board[:3]))

#out.1
0 1 2
#out.2
[ 0 ,   1 ,   2 ]
2 Answers
Related