Skip to content

Commit 5761a37

Browse files
committed
match case _
1 parent a57bb22 commit 5761a37

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

week1 Conditionals/house.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
#### match ####
44

5-
# match name:
6-
# case "Harry":
7-
# print("Gryffindor")
8-
# case "Hermione":
9-
# print("Gryffindor")
10-
# case "Ron":
11-
# print("Gryffindor")
12-
# case "Draco":
13-
# print("Slytherin")
14-
# case _:
15-
# print("Who?")
5+
match name:
6+
case "Harry":
7+
print("Gryffindor")
8+
case "Hermione":
9+
print("Gryffindor")
10+
case "Ron":
11+
print("Gryffindor")
12+
case "Draco":
13+
print("Slytherin")
14+
case _:
15+
print("Who?")
1616

1717

1818
match name:

0 commit comments

Comments
 (0)