
def is_siret(siret):
    # A valid SIRET is composed by 14 digits
    try:
        int(siret)
    except ValueError:
        return False

    return len(siret) == 14


def is_siret(siret):
    # A valid SIRET is composed by 14 digits
    return len(siret) == 14 and siret.isdigit()

Use isdigit() instead of int()
Use isdigit() instead of int()

  
  def is_siret(siret):
      # A valid SIRET is composed by 14 digits
+     return len(siret) == 14 and siret.isdigit()
-     try:
-         int(siret)
-     except ValueError:
-         return False
  
-     return len(siret) == 14
- 
Use isdigit() instead of int()
## Code Before:

def is_siret(siret):
    # A valid SIRET is composed by 14 digits
    try:
        int(siret)
    except ValueError:
        return False

    return len(siret) == 14

## Instruction:
Use isdigit() instead of int()
## Code After:

def is_siret(siret):
    # A valid SIRET is composed by 14 digits
    return len(siret) == 14 and siret.isdigit()
