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']
4.25
8
#Capitalise list
c = ['Kenya','Uganda', 'Tanzania','Ethopia','Azerbaijan']
converted_list = [x.upper() for x in c]print(converted_list)print("Remember to clap :-)")
Thank you!
8
0
Are there any code examples left?
New code examples in category TypeScript