so what should i do i cant even put just x in .join() as its not a string
my output looks like this:
[5, 4, 1]
[4, 1, 1]
[3, 1, 4]
but i want it this way :
5 4 1
4 1 1
3 1 4
plz help me get it!
Traceback (most recent call last):
File “C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\play.py”, line 14, in
boardy(board)
File “C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\play.py”, line 12, in boardy
print("".join(x))
TypeError: sequence item 0: expected str instance, int found
join can be used to join string characters in a list to form a single string, or it can be used to insert a separator character (or string) between letters in a string. Consequently it can take a list or a string as arguments.
The key is in how you build the list, to begin with. Convert the numbers to string when appending to the list.