Q. What will this code output?

Code:
print('Hello'[::-1])
  • (A) Hello
  • (B) olleH
  • (C) Error
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (B) olleH
Explanation: The slice with step -1 reverses the string.
Explanation by: Mr. Dubey
The slice with step -1 reverses the string.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
92
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
96%
Success Rate