I am trying to learn python from scratch and while doing a practice on While loop, I got stuck on implementing it in my simple program as we do in C# in Do While loop. Actually I have a Simple program which prompt user to enter his Mobile number and if Length of the mobile number is less then 10 digits, then it would display a message like "Enter a valid Number" and after that it will again ask to enter Mobile Number.
print("Please Enter your Mobile Number")
mobilenum = input("Mobile Number:\n")
while(True):
if(len(mobilenum)< 10):
print("Please Enter a valid Mobile Number")
break
else:
print(mobilenum)
In my case, If I enter less then 10 digits then the program gets stopped and not asking to enter number again
Please suggest the proper code.