About 2,580,000 results
Open links in new tab
  1. python - How to change a string into uppercase? - Stack Overflow

    How can I convert a string into uppercase in Python? When I tried to research the problem, I found something about string.ascii_uppercase, but it couldn't solve the problem:

  2. Changing string to uppercase in python - Stack Overflow

    Mar 5, 2019 · In Python str.upper() returns a copy of the string with upper case values, and does not mutate the original string. In fact, strings in Python are immutable anyways.

  3. python - Capitalize a string - Stack Overflow

    Does anyone know of a really simple way of capitalizing just the first letter of a string, regardless of the capitalization of the rest of the string? For example: asimpletest -> Asimpletest

  4. python capitalize first letter only - Stack Overflow

    Sep 13, 2012 · Very useful answer, because capitalize & title first lowercase the whole string and then uppercase only the first letter.

  5. Count the uppercase letters in a string with Python

    Aug 8, 2013 · I am trying to figure out how I can count the uppercase letters in a string. I have only been able to count lowercase letters: def n_lower_chars(string): return sum(map(str.islower, …

  6. What is the naming convention in Python for variables and …

    As the Style Guide for Python Code admits, The naming conventions of Python's library are a bit of a mess, so we'll never get this completely consistent Note that this refers just to Python's …

  7. how to upper case every other word in string in python

    Dec 9, 2011 · 1 I am wondering how to uppercase every other word in a string. For example, i want to change "Here is my dog" to "Here IS my DOG" Can anyone help me get it started? All …

  8. How can I capitalize the first letter of each word in a string?

    From the Python documentation on capwords: Split the argument into words using str.split (), capitalize each word using str.capitalize (), and join the capitalized words using str.join ().

  9. python - Convert a list with strings all to lowercase or uppercase ...

    I have a Python list variable that contains strings. Is there a function that can convert all the strings in one pass to lowercase and vice versa, uppercase?

  10. Python: string.uppercase vs. string.ascii_uppercase

    Feb 9, 2011 · This might be a stupid question but I don't understand what's the difference between string.uppercase and string.ascii_uppercase in the string module. Printing the …