def longueurPlusGrandeLigne(source):
    """returns the lenght of the longest line in the source file"""
    try:
        with open(source, "r", encoding="utf-8") as f:
            max = 0
            for ligne in f:
                if len(ligne) > max:
                    max = len(ligne)
            return max
    except IOError:
        print("Lecture du fichier", source, "impossible.")
        return 0