>>> thetuple = (1, 2, 3)
>>> print("this is a tuple: %s" % (thetuple,))
this is a tuple: (1, 2, 3)
Making a singleton tuple with the tuple of interest as the only item, i.e. the (thetuple,)
part, is the key bit here.
More Related Contents:
- how to count average sentence length (in words) from a text file contains 100 sentences using python [closed]
- How to leave/exit/deactivate a Python virtualenv
- Correct way to try/except using Python requests module?
- Constructing pandas DataFrame from values in variables gives “ValueError: If using all scalar values, you must pass an index”
- How do I read and write CSV files with Python?
- Get all the diagonals in a matrix/list of lists in Python
- Splitting a list based on a delimiter word
- Intersecting two dictionaries
- Python convert tuple to string
- Is the shortcircuit behaviour of Python’s any/all explicit?
- Iterating through two lists in Django templates
- Pythonic way to combine for-loop and if-statement
- Prevent creating new attributes outside __init__
- What is the purpose of a context manager in python [duplicate]
- Iterating over a numpy array
- An integer is required? open()
- What is the difference between pandas agg and apply function?
- Efficient outer product in python
- Python wildcard search in string
- Python: Print a variable’s name and value?
- Time delay Tkinter
- open url from pythonanywhere
- Extracting data from HTML table
- Animating “growing” line plot in Python/Matplotlib
- Resample hourly TimeSeries with certain starting hour
- Duplicate elements in a list [duplicate]
- Python: iterating over list vs over dict items efficiency
- How to clear variables in ipython?
- Slow scrolling down the page using Selenium
- How to change the foreground or background colour of a selected cell in tkinter treeview?