0

What is mean of this method print(input()[::-1]) in python

Anyone tell me why, without using loop it print all letter of string.

29th May 2021, 2:24 AM
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎ - avatar
2 ответов
+ 2
input() returns the input string, and [::-1] reverses it. Info about [::-1] can be found here: https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2453/
29th May 2021, 2:27 AM
你知道規則,我也是
你知道規則,我也是 - avatar
0
Can I use this method in JavaScript
29th May 2021, 2:35 AM
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎ - avatar