So, I am completelly stucked here. There is another post with this problem but I am still unable to continue… and the thread is closed. Can anyone please help?
My code so far:
class Board:
def init(self, board):
self.board = board
def __str__(self):
upper_lines = f'\n╔═══{"╤═══"*2}{"╦═══"}{"╤═══"*2}{"╦═══"}{"╤═══"*2}╗\n'
middle_lines = f'╟───{"┼───"*2}{"╫───"}{"┼───"*2}{"╫───"}{"┼───"*2}╢\n'
lower_lines = f'╚═══{"╧═══"*2}{"╩═══"}{"╧═══"*2}{"╩═══"}{"╧═══"*2}╝\n'
board_string = upper_lines
for index, line in enumerate(self.board):
row_list = []
/* User Editable Region */
for square_no, part in enumerate([line[:3], line[3:6], line[6:]], start=1):
'|'.join(for item in part:
str(item)
Normally I get stuck several times in each challenge, but so far it is the irst time that other users posts don’t help me find the answer… please heeeelp!
Thanks for the answer, and sorry I didn’t get back earlier, I had a crazy busy week at work… and this weekend was time to chill
I am trying this but it is failing:
for square_no, part in enumerate([line[:3], line[3:6], line[6:]], start=1):
for item in part:
'|'.join(part)
str(item)
Upon trying, I get the following hint: You should call str() on each element in part using a generator expression.
But I do not understand what is that supposed to mean… the more I search the more confused I get cause nothing seems to be similar to this problem…
I have also tried:
for square_no, part in enumerate([line[:3], line[3:6], line[6:]], start=1):
for item in part:
'|'.join(str(part))
…as well as the following, based on what I found in stack overflow…
for square_no, part in enumerate([line[:3], line[3:6], line[6:]], start=1):
'|'.join(str(item) for item in [part])
…and…
for square_no, part in enumerate([line[:3], line[3:6], line[6:]], start=1):
'|'.join(str(part) for item in [part])
This one seems to be a tough one for me… any hints?