MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-Python-Course / http_status

Function http_status

Chapter 12/03_match_case.py:1–10  ·  view source on GitHub ↗
(status)

Source from the content-addressed store, hash-verified

1def http_status(status):
2 match status:
3 case 200:
4 return "OK"
5 case 404:
6 return "Not Found"
7 case 500:
8 return "Internal Server Error"
9 case _:
10 return "Unknown status"
11
12
13print(http_status(5007))

Callers 1

03_match_case.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected