+ 1

how can i stop python program just with a printingt app closed?

please write some example for me

22nd Oct 2020, 11:49 PM
siavash
siavash - avatar
7 Respuestas
+ 3
23rd Oct 2020, 1:16 AM
Kevin ★
+ 3
when user enter 'close app' in the menu i want my app to be closed.
23rd Oct 2020, 11:36 AM
siavash
siavash - avatar
+ 3
actually i did it with simple print function that prints program closed
23rd Oct 2020, 8:06 PM
siavash
siavash - avatar
+ 1
You can exit a script this way: from sys import exit exit(0) Can you share your code? What kind of app are you making? I think i still don't get what you want.
23rd Oct 2020, 8:44 PM
Kevin ★
+ 1
https://code.sololearn.com/c2iSF6FNBrF8/?ref=app here is my code. my question is about close app function. but it does not run on mobile phone.
23rd Oct 2020, 8:47 PM
siavash
siavash - avatar
+ 1
"it does not run on mobile phone" Why? Where are you running the code: on SoloLearn app or somewhere else? What's the expected output? What's the actual output? Have you tried my code? What do you want to do exactly?
23rd Oct 2020, 8:56 PM
Kevin ★
+ 1
I run it with python idle on pc. its create a telephone dictionary. out put can be printing the dictionary. it inputs the names and numbers that user want to save. and then can add or delete them from telephone dictionary or search into it.
23rd Oct 2020, 9:08 PM
siavash
siavash - avatar