+ 7

How to use list in switcher of python

For example List =[1,2,1,1,3] And wanted to print If 1 small If 2 medium If 3 large

8th Jan 2019, 9:59 AM
AKS
AKS - avatar
6 Answers
+ 7
Not working my friend
8th Jan 2019, 10:35 AM
AKS
AKS - avatar
+ 7
I know
8th Jan 2019, 10:38 AM
AKS
AKS - avatar
+ 5
I mean to use switch and case staments
8th Jan 2019, 10:12 AM
AKS
AKS - avatar
+ 4
https://jaxenter.com/implement-switch-case-statement-JUMP_LINK__&&__python__&&__JUMP_LINK-138315.html site contain an example for how to implement switch...case in Python
8th Jan 2019, 10:15 AM
Kelvin Paul
Kelvin Paul - avatar
+ 4
This is the best way to do it in Python. https://code.sololearn.com/cStYbJTdhHQz
8th Jan 2019, 11:15 AM
John Wells
John Wells - avatar
+ 1
X=[34,20,10,5] print (str(min(X))+" small") print (str(max(X))+" large") Did you mean?
8th Jan 2019, 10:10 AM
Kelvin Paul
Kelvin Paul - avatar