What is the output of print(list("123"[::-1])) in Python?
- ['1', '2', '3']
- ['3', '2', '1']
- [1, 2, 3]
- [3, 2, 1]
The output will be a list containing the characters of the string "123" in reverse order. The [::-1] slicing reverses the string, and list() converts it into a list of characters.
Loading...
Related Quiz
- In a business analysis case study of a service company, what metric would best measure customer satisfaction?
- In the ETL process, ________ is crucial for ensuring data accuracy and consistency.
- A _________ chart is a visual representation of project tasks along a timeline, commonly used in project planning.
- What advanced technique is used for predictive analytics in reporting?
- What advanced feature in BI tools helps in forecasting future trends based on historical data?