def n_upper_chars(string):
return sum(map(str.isupper, string))
my_string = "car"
my_string.upper() # Makes EVERY letter uppercase
print(my_string)
>>> "CAR"
my_string = "car"
my_string.title() # Makes ONLY FIRST letter uppercase and others lowercase
print(my_string)
>>> "Car
s = "hello openGeNus"
t = s.title()
print(t)
PythonCopy