Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> a = (b,)+c
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- NameError: name 'b' is not defined
- >>> a = 1
- >>> b = 2
- >>> c = 3
- >>> a = (b,)+c
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: can only concatenate tuple (not "int") to tuple
- >>> c = (1)
- >>> a = (b,)+c
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: can only concatenate tuple (not "int") to tuple
- >>> x = (2,)+(1)
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: can only concatenate tuple (not "int") to tuple
- >>> x = (2,)+("s","a")
- >>> x
- (2, 's', 'a')
- >>> x = (2,)+("s")
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: can only concatenate tuple (not "str") to tuple
- >>>
Advertisement
Add Comment
Please, Sign In to add comment