
def fragment(sequence, size=5):
    """
    Fragment a string sequence using a sliding window given by size

    :param sequence: String containing the sequence
    :param size: Size of the window

    :return: a fragment of the sequence with the given size
    """
    for i in range(len(sequence) - size + 1):
        yield sequence[i: i + size]



def fragment(sequence, size=5):
    """
    Fragment a string sequence using a sliding window given by size

    :param sequence: String containing the sequence
    :param size: Size of the window

    :return: a fragment of the sequence with the given size
    """
    if size > 0:
        for i in range(len(sequence) - size + 1):
            yield sequence[i: i + size]

Handle sliding window with size 0
Handle sliding window with size 0

  
  def fragment(sequence, size=5):
      """
      Fragment a string sequence using a sliding window given by size
  
      :param sequence: String containing the sequence
      :param size: Size of the window
  
      :return: a fragment of the sequence with the given size
      """
+     if size > 0:
-     for i in range(len(sequence) - size + 1):
+         for i in range(len(sequence) - size + 1):
-         yield sequence[i: i + size]
+             yield sequence[i: i + size]
  
- 
Handle sliding window with size 0
## Code Before:

def fragment(sequence, size=5):
    """
    Fragment a string sequence using a sliding window given by size

    :param sequence: String containing the sequence
    :param size: Size of the window

    :return: a fragment of the sequence with the given size
    """
    for i in range(len(sequence) - size + 1):
        yield sequence[i: i + size]


## Instruction:
Handle sliding window with size 0
## Code After:

def fragment(sequence, size=5):
    """
    Fragment a string sequence using a sliding window given by size

    :param sequence: String containing the sequence
    :param size: Size of the window

    :return: a fragment of the sequence with the given size
    """
    if size > 0:
        for i in range(len(sequence) - size + 1):
            yield sequence[i: i + size]
