summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tutorial/controlflow.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index a819756..fad8746 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -395,9 +395,11 @@ Several other key features of this statement:
from enum import Enum
class Color(Enum):
- RED = 0
- GREEN = 1
- BLUE = 2
+ RED = 'red'
+ GREEN = 'green'
+ BLUE = 'blue'
+
+ color = Color(input("Enter your choice of 'red', 'blue' or 'green': "))
match color:
case Color.RED: