Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

convert list elements to uppercase python

>>> [x.lower() for x in ["A", "B", "C"]]
['a', 'b', 'c']
>>> [x.upper() for x in ["a", "b", "c"]]
['A', 'B', 'C']
Comment

change strings in a list to uppercase

>>> [x.lower() for x in ["A", "B", "C"]]
['a', 'b', 'c']
>>> [x.upper() for x in ["a", "b", "c"]]
['A', 'B', 'C']
Comment

how to convert list to all uppercase

#Capitalise list

c = ['Kenya','Uganda', 'Tanzania','Ethopia','Azerbaijan']

converted_list = [x.upper() for x in c]print(converted_list)print("Remember to clap :-)")
Comment

python: each string in a list into its upper case version

def to_uppercase(strings):
    return [s.upper() for s in strings] 
Comment

PREVIOUS NEXT
Code Example
Python :: python remove first substring from string 
Python :: % operatior in python print 
Python :: discord.py how get user input 
Python :: evaluate how much a python program memory 
Python :: ms access python dataframe 
Python :: push to pypi 
Python :: models. type for phone number in django 
Python :: find different between list 
Python :: randint python 
Python :: get json from file python 
Python :: request headers in django 
Python :: convert 1 to "one" python 
Python :: dockerfile for django project 
Python :: column names pandas 
Python :: Python - How To Check if a String Is a Palindrome 
Python :: check remote port is open or not using python 
Python :: unique_together what is used of it in django 
Python :: python for loop one line 
Python :: python list 
Python :: generate random token or id in django 
Python :: python variables in multiline string 
Python :: how to make a variable 
Python :: matplotlib dateformatter x axis 
Python :: unpacking python 
Python :: extract integer from a string in pandas 
Python :: how to convert boolean type list to integer 
Python :: how to execute bash commands in python script 
Python :: buscar valor aleatorio de una lista python 
Python :: how to make addition in python 
Python :: intersection() Function of sets in python 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =