Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

duplicate a list with lowercase in python

colors = ['Red', 'Blue', 'Green', 'Purple']
lower_colors = [ ]

for color in colors:
  lower_colors.append(color.lower())

print(lower_colors)

#output - ['red', 'blue', 'green', 'purple']
 
PREVIOUS NEXT
Tagged: #duplicate #list #lowercase #python
ADD COMMENT
Topic
Name
3+8 =