0
Write a program that takes a list as input and outputs the last element of that list.
it is a code coach problem and i m totally unable understand this question can anyone give me some hint.. to solve this
6 ответов
+ 1
yes actually i did not the syntax to print last element
thanks for your help
+ 1
print(elements[::-1][0])
0
actually question is to make list
and i was unable to understand to do this
0
and it is the first step so how can i show my try
0
l = list(input())
print(l[-1])
You will get better answer, if you show your attempt to the community.Hope it help.
0
#trythis
x = input()
elements = x.split()
print(elements[-1])