To create a tuple with a single item, you need to add a _______ after the item.
- Colon
- Comma
- Period
- Semicolon
To create a tuple with a single item, you need to add a comma after the item. For example, my_tuple = (42,). A trailing comma distinguishes a single-item tuple from an expression in parentheses.
Loading...
Related Quiz
- Which of the following is a modulus operator in Python?
- How would you deploy a Django application to a production environment, considering scalability and security?
- In RESTful API development, what does the acronym CRUD stand for?
- What potential issue might arise from relying on the value of the name attribute in a module that is dynamically imported using functions like import()?
- _______ is a built-in Python function that dynamically loads a module into the current namespace.