About 1,840,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: >>> s = 'sdsd'...

  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. How do I lowercase a string in Python? - Stack Overflow

    Mar 7, 2023 · Is there a way to convert a string to lowercase? "Kilometers" → "kilometers" See How to change a string into uppercase? for the opposite.

  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. How can I get Python to use upper case letters when printing ...

    4 The more Python 3 idiom using f-strings would be: value = 1234 print(f'0x{value:X}') '0x4D2' Notes (and why this is not a duplicate): shows how to avoid capitalizing the '0x' prefix, which …

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

    See Python PEP 8: Function and Variable Names: Function names should be lowercase, with words separated by underscores as necessary to improve readability. Variable names follow …

  7. 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?

  8. Check if string is upper, lower, or mixed case in Python

    Sep 21, 2016 · I want to classify a list of string in Python depending on whether they are upper case, lower case, or mixed case How can I do this?

  9. How to let Python recognize both lower and uppercase input?

    Oct 4, 2012 · How to let Python recognize both lower and uppercase input? [duplicate] Asked 12 years, 8 months ago Modified 3 years, 9 months ago Viewed 101k times

  10. python - How do I do a case-insensitive string comparison

    Jun 18, 2022 · How can I compare strings in a case insensitive way in Python? I would like to encapsulate comparison of a regular strings to a repository string, using simple and Pythonic …

Refresh