Python Question / Quiz; What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇 #python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming #pythonquiz #ai #ml #machinelearning #datascience
@Python_Dv I guess B. But why'd you have to do this? This is so confusing. Will someone ever have to do this?
@Python_Dv The string "python" is sliced with [::-2], which means it starts from the end, moves backward, and picks every second character. Reversing "python" gives "nohtyp" Selecting every second character results in "nhy".
@Python_Dv most probably A. Because start and end points are not stated. So, by default it starts from the last character.