Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test():
- a = 'Hello, '
- b = 'world!'
- c = 123
- return a, b, c
- x, y, z = test()
- print x
- print y
- print z
- print x + y
- ######################## Vystup:
- martin@pc:~$ python
- Python 2.7.6 (default, Mar 22 2014, 22:59:56)
- [GCC 4.8.2] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> def test():
- ... a = 'Hello, '
- ... b = 'world!'
- ... c = 123
- ... return a, b, c
- ...
- >>> x, y, z = test()
- >>>
- >>> print x
- Hello,
- >>> print y
- world!
- >>> print z
- 123
- >>> print x + y
- Hello, world!
- >>>
Advertisement
Add Comment
Please, Sign In to add comment