Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python switch item

def operations(letter):
    switch={
       'a': "It is a vowel",
       'e': "It is a vowel",
       'i': "It is a vowel",
       'o': "It is a vowel",
       'u': "It is a vowel",
       }
    return switch.get(letter,"It is a not a vowel")		# disregard 2nd parameter
operations('a')
Source by pythongeeks.org #
 
PREVIOUS NEXT
Tagged: #python #switch #item
ADD COMMENT
Topic
Name
8+5 =