No Enclosing Delimiters in Python


Any set of multiple objects, comma-separated, written without identifying symbols, i.e., brackets for lists, parentheses for tuples, etc., default to tuples, as indicated in these short examples −

Example

 Live Demo

#!/usr/bin/python
print 'abc', -4.24e93, 18+6.6j, 'xyz';
x, y = 1, 2;
print "Value of x , y : ", x,y;

Output

When the above code is executed, it produces the following result −

abc -4.24e+93 (18+6.6j) xyz
Value of x , y : 1 2

Updated on: 28-Jan-2020

206 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements