Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
46
11
114
19
11千
此推文已無法使用。
0
0
0
0
0
"python"[2:5] creates a substring of "python", starting at index 2, and stopping before 5. The indices are: 0 p 1 y 2 t <-- start 3 h 4 o 5 n <-- stop (excluded) Thus, the result is "tho" Hence, the print will output tho and that's the answer
1
0
0
0
63
My bad, thanks for pointing that out. It has to be B.
1
0
1
0
7
United States 趨勢
- 1. White Sox 6,216 posts
- 2. #AskFFT N/A
- 3. Happy Winter Solstice 9,216 posts
- 4. Good Sunday 69.4K posts
- 5. Murakami 9,078 posts
- 6. #sundayvibes 4,713 posts
- 7. Victory Sunday 3,259 posts
- 8. #FirstDayOfWinter N/A
- 9. And Mary 27.2K posts
- 10. Muhammad Qasim 32.7K posts
- 11. ORMKORN BA BLOSSOMIN 266K posts
- 12. #BlossominOrmTouchOfBloom 267K posts
- 13. Estime 5,667 posts
- 14. #SundayMotivation 1,805 posts
- 15. Full PPR 1,110 posts
- 16. Sunday Funday 2,591 posts
- 17. Northern Hemisphere 2,248 posts
- 18. Ugarte 3,390 posts
- 19. Todd Blanche 6,453 posts
- 20. Dowdle 1,067 posts
Loading...
Something went wrong.
Something went wrong.