Program Display one or more Character of String
s = 'Hello world!'
# s[4] = 'o'
print("s[4] = ", s[4])
# s[6:11] = 'world'
print("s[6:11] = ", s[6:11])
Output
s[4] = o
s[6:11] = world
Program Display one or more Character of String
s = 'Hello world!'
# s[4] = 'o'
print("s[4] = ", s[4])
# s[6:11] = 'world'
print("s[6:11] = ", s[6:11])
Count Upper Case and Lower Case Word in a string (Python) def string_test(s): d={"UPPER_CASE":0, "LOWER_CASE":...
0 comments:
Post a Comment
gurnoorsingh5974@gmail.com