πŸ“Š Python
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

πŸ‘οΈ
60
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
98%
Success Rate