πŸ“Š Python
Q. What is the output of the following code?
Code:
print('Python'[-1])
  • (A) P
  • (B) n
  • (C) o
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) n

Explanation: Negative indexing accesses elements from the end. `-1` means the last character.

Explanation by: Mr. Dubey
Negative indexing accesses elements from the end. `-1` means the last character.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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