How do I make all Python strings case?

Asked 2 years ago, Updated 2 years ago, 113 views

a = "hoHoho" The "HOHOHO" My "hohoho" Is there a function that changes to?

I think there's something else besides turning the for door Please let me know

string python uppercase lowercase unicode

2022-09-21 16:26

1 Answers

Lowercase: string.lower(), uppercase: string.upper Both lower()/upper() return the converted string.

Here's how to write it

s = "Kilometer"
print(s.lower())
print(s.upper())


2022-09-21 16:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.