To elaborate I have a string x
that will be in the structure of
"Test_Case_Box 1"
"Test_Case_Box 2"
"Test_Case_Circle 1"
I was using if
and elif
statements by checking for example if
x[0:19] == "Test_Case_Box"
With the match/case syntax if I set the term
as my string x
, can I still create if like cases, for example
match x:
case x[0:10] == 'Request_Fun':
print(f'-- x[0:10]: {x[0:10]}')