Q. What is the output for 'python' [-3]?

  • (A) ‘h’
  • (B) ‘t’
  • (C) ‘o’
  • (D) Error: negative index
πŸ’¬ Discuss
βœ… Correct Answer: (A) ‘h’
Explanation: Negative indexes start from the end of a string and are inverted.
Explanation by: Rajeev Malhotra
Negative indexes start from the end of a string and are inverted.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
201
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Rajeev Malhotra
Publisher
πŸ“ˆ
95%
Success Rate