+ 4

What is parentheses in python and what is the use of parentheses?

17th Jun 2018, 5:14 AM
Aditya Mishra
Aditya Mishra - avatar
3 Respostas
+ 4
parenthesis () they are used in receiving function arguments...in tuples and several other areas
17th Jun 2018, 5:27 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 4
Square brackets are lists while parentheses are tuples. They are not lists, they are frequently used to enclose arguments to functions and methods. In languages such as Lisp, parentheses are used to define an s-expression. In regular expressions, parentheses are used for pattern grouping and capturing.
17th Jun 2018, 5:29 AM
Andrew Watts
Andrew Watts - avatar
+ 4
Hello, Aditya Mishra ! Parentheses can be passed arguments for functions, example(arg1, arg2, arg3).
17th Jun 2018, 5:35 AM
Alexander Sokolov
Alexander Sokolov - avatar