You have to use a break statement if the user enters some value. Where the while loop will run and prompt the input message until some value is given by the user. The syntax for while input is not empty in Python.
while True:
s = input()
if not s:
break
somelist.append(s)
You can check input is empty or not with the help of the if statement.
x=input()
if x:
print(x)
else:
print('empty input')
Run while loop input is not empty in Python
Simple example code.
name = ''
# Start a loop that will run until the user give input
while True:
name = input("Enter Name to exist: ")
if name:
print(name)
break
Output:

Do comment if you have any doubts and suggestions on this Python input topic.
Note: IDE: PyCharm 2021.3.3 (Community Edition)
Windows 10
Python 3.10.1
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.

Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.
This does not work in Python 3 it seems. This is my code:
def detalles_cliente(prompt):
while True:
return(input(prompt))
if prompt:
return(prompt)
break
NOMBRE_CLIENTE = str(detalles_cliente(‘Nombre Cliente: ‘))
print(NOMBRE_CLIENTE)
Even if you enter nothing it breaks out with no errors.