Ad
  • Default User Avatar

    In short( Extremly short) the [:size] is slicing it until the number you put there so if it's 6, the output is up to index 6 but not included (remember the index in python starts at 0)
    so it '10' * 6 and it omitts the 6th index.

    [012345] - index
    [101010] - ouput
    
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    It's Python list comprehension. Make a research about it if you don't know it. For the rest, take a pencil and a paper with a small example and try to figure out what the code does.