13 ms·
Or, if you have a list that might be of mixed types that happen to have capitalize methods: >>> import operator >>> map(operator.methodcaller("capitali
by kingkilr 16y ago
Or, if you have a list that might be of mixed types that happen to have capitalize methods:
>>> import operator
>>> map(operator.methodcaller("capitalize"), your_list)
- vithlani 16y agoHot damn, I had no idea bout that module.....