조혁균

exit function

1 +{
2 + "cells": [
3 + {
4 + "cell_type": "code",
5 + "execution_count": 8,
6 + "metadata": {},
7 + "outputs": [
8 + {
9 + "name": "stdout",
10 + "output_type": "stream",
11 + "text": [
12 + "If you enter 'exit', the program will exit\n",
13 + "exit\n"
14 + ]
15 + }
16 + ],
17 + "source": [
18 + "import sys\n",
19 + "# sys.exit()\n",
20 + "print(\"If you enter 'exit', the program will exit\")\n",
21 + "while input() != \"exit\":\n",
22 + " print(\"If you enter 'exit', the program will exit\")"
23 + ]
24 + }
25 + ],
26 + "metadata": {
27 + "kernelspec": {
28 + "display_name": "Python 3",
29 + "language": "python",
30 + "name": "python3"
31 + },
32 + "language_info": {
33 + "codemirror_mode": {
34 + "name": "ipython",
35 + "version": 3
36 + },
37 + "file_extension": ".py",
38 + "mimetype": "text/x-python",
39 + "name": "python",
40 + "nbconvert_exporter": "python",
41 + "pygments_lexer": "ipython3",
42 + "version": "3.7.1"
43 + }
44 + },
45 + "nbformat": 4,
46 + "nbformat_minor": 2
47 +}