- 3
Write a program that takes a string as input and output the last character of that string
word=(input()) print(word[:-1])
9 odpowiedzi
+ 12
txt = str(input())
reverse = txt[::-1]
last = reverse[0]
print (last)
this worked for me
+ 4
it's simple do like this :-
word=(input())
print(word[-1:])
+ 1
joanna Godfrey
Should be -1:
+ 1
a = input()
print(a[-1])
+ 1
word=(input())
print(word[-1:])
+ 1
try this code:
string = input()
stringLen = len(string)
print(string[::-(stringLen)])
0
txt = str(input())
reverse = txt[::-1]
last = reverse[0]
print (last)
done...!
0
a = input()
print(a[-1])
- 1
Hi Godfrey!
You can also do it like this
word=(input())
print(word[-1])