Skip to main content

describe_string.py

Download source

describe_string.py
s = input("Input a String: ")
length = len(s)
print(
    "The length of the string is ",
    length,
    ", the first character ",
    s[0],
    ", and the last character ",
    s[-1],
)