Learn Classes and Objects by Building a Sudoku Solver - Step 14

Tell us what’s happening:

Describe your issue in detail here.

Your 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):
                for item in part(|):
                    part.join([|])
                    
                    

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Learn Classes and Objects by Building a Sudoku Solver - Step 14

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

Hi, do you have a question, or are you failing a test? Is there an error message?

Please provide some more information

Welcome to the forum @AngoyJessaMae

Now, you would join the elements of the segment (part) with the pipe character (|).
For that, first, use a for loop for item in part to access all elements.
Then, use the join() method on the | character to join the elements of the segment (part).
After that, convert each element to a string using str(item).
You should use the join() method on the | character to join the elements of the segment (part ). add test for “” as well

The instructions are a bit vague on the order of the code.

Your code has part joining the | (pipe character).
However the instructions ask to use the join method on |.

Start with that, then use the hint messages to guide you on the rest of the code.

Happy coding

Honestly, I find these instructions to be too vague to understand. I have worked through most of these coding projects quickly, but I am really stuck on this step. I really do not understand what they want us to do here.

Please open a new topic. Use the “ask for help” button and it will share your code as well.