Trying to stop the below code from continuously requesting input after user enter q. I enter q as the first input but loop just continues. How do I get it while loop to stop if the user enter the letter q. I'm using python3 Thank you.
w = ''
while w != 'q':
w = input("Enter the student's W#:")
name = input("Enter the student's name:")
phone = input("Enter the students phone number:")
while True: w= input() if w=='q': break