PYTHON: Search for appropriate file names and content announcements

Hi everyone,
My project is to enter a json file or txt file. If it exists in my source then read the file entered and evaluate the condition.
This condition: Create a new dictionary from the list in the selected file with the condition if value ‘numero’ duplicated so return new dictionnary emty, otherwise create a new dictionary.

But my difficulty now is when I enter the file name to check, if true, instead of announcing the file content, I have to enter the file name again before announcing the next content. And if the ‘numero’ value is duplicated, a new dictionary is created.

How can I fix?
This’s my code and the information output.

import os
import json

#check file name in my source
def saisie_nomf(lst):
    print("Donner le nom du fichier avec l'extension ['.json','.txt']: ")
    correct = False
    file = input()
    while correct == False:
        if("." not in file):
            print("Le manque . de l'extension!")
            print("Donner le nom de fichier valide: ")
            file = input()
        else:
            if os.path.splitext(file)[1] in lst:
                if file not in l:
                    print("Fichier introuvable!")
                    print("Donner le nom de fichier valide: " )
                    file = input()

                else:
                    correct = True
            else:
                print("Extension incorrecte!")
                print("Donner le nom de fichier valide: ")
                file = input()

    return file

#check value 'numero': duplicated or not
def check(seq):
    for i in seq:
        (key, value), *rest = i.items()
        if value not in new_dict:
            new_dict[value] = dict(rest)
        else:
            return("Numero duplicated! " + "\n---->" +
                  value + "\nFichier non utilisable!")
    return new_dict

path = os.getcwd()
l = os.listdir(path)

new_dict = {}

print("Voici le contenu de dossier " + path + " - Recherche: \n" )
for file in l:
    print("- " + file + "\n")
list=['.json','.txt']
print("Voici le fichier choisi: " +saisie_nomf(list))


with open(saisie_nomf(list), 'r', encoding="utf-8") as liste:
    f = json.load(liste)

check(f)
print("Données source: ")
print(f)

Output: 

In these two lines:

print("Voici le fichier choisi: " +saisie_nomf(list))
with open(saisie_nomf(list), 'r', encoding="utf-8") as liste:

you are calling the saisie_nomf function twice, each time will request input from the user. You need to store the results from the first call and not call it again. E.g:

print("Voici le fichier choisi: ")
filename = saisie_nomf(list))
with open(filename, 'r', encoding="utf-8") as liste: