Python Question / Quiz; What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇 #python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming…
18
21
158
44
13K
C The reason is that [-1] tells split to start at the end 'g' and go back to the first occurence of a space `" "`.
0
0
1
0
326
The string starts with a space, so when we split it by " ", we get ['', 'Python', 'Programming'] — the last element (-1) is 'Programming', which is why the output is Programming.
0
0
3
0
448
United States Trends
- 1. #BaddiesUSA 34.8K posts
- 2. Rams 23.7K posts
- 3. Cowboys 91.6K posts
- 4. Eagles 131K posts
- 5. Stafford 10.7K posts
- 6. Bucs 10.6K posts
- 7. Baker 18.7K posts
- 8. Scotty 7,466 posts
- 9. #RHOP 8,641 posts
- 10. Raiders 58.2K posts
- 11. Stacey 28.6K posts
- 12. Teddy Bridgewater N/A
- 13. Chip Kelly 4,366 posts
- 14. Todd Bowles 1,413 posts
- 15. Pickens 29.3K posts
- 16. #ITWelcomeToDerry 9,345 posts
- 17. Browns 104K posts
- 18. Shedeur 119K posts
- 19. Nimmo 19.4K posts
- 20. Ahna 4,302 posts
Loading...
Something went wrong.
Something went wrong.