51088/add-variables-to-tuple
I want to add the following as a tuple. What should I do?
name = "tom" age = 4 location = "paris"
Use the following piece of code:
name = "tom" age = 4 location = "paris" tom = tuple((name, age, location)) tom
OUTPUT:
('tom', 4, 'paris')
You can use '\n' for a next ...READ MORE
You know what has worked for me ...READ MORE
>>> d = {'key':'value'} >>> print(d) {'key': ...READ MORE
(Spyder developer here) The Python console was ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
You can simply the built-in function in ...READ MORE
This is done because these functions are ...READ MORE
To check if a website allows web ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.