+ 1
How to remove brackets and apostrophes
x = input() elements = x.split() print(elements[-1::1]) The output is correct but it won't accept it because it has to have no brackets and apostrophes and all the past lessons regarding splitting have brackets
4 Answers
+ 2
thank you againnnnn
+ 1
fyi if you want to slice w/o brackets use
print(elements.__getitem__(4))
but i may have misunderstood your question :/
+ 1
1.elements=x.split(" ")
2.print(elements[:-1][0]
3.el=[]
for i in elements:
el+=i
print(el[:-1])