Answers for "match python 3.10"

1

match python 3.10

match text:
  case "test": print("Hello") # prints "Hello" if text == "test"
  case "123": print("World") # prints "World" if text == "123"
  case "abc": print("!!!") # prints "("!!!")" if text == "abc"
  case "xyz": print("Python3.10")  # prints "Python3.10" if text == "xyz"
Posted by: Guest on January-24-2022

Python Answers by Framework

Browse Popular Code Answers by Language