+ 1

Different bucket in python

whats is the diffrent () and [ ].im confuse.please add some example too thanx

8th Apr 2017, 12:47 PM
Kevin AS
Kevin AS - avatar
3 Réponses
+ 2
() produces an empty TUPLE while [] produces an empty LIST. A tuple is immutable but a list is mutable.
8th Apr 2017, 3:16 PM
Amaras A
Amaras A - avatar
+ 1
difference lies in their use..parentheses are used in comparing, loops.etc..while [] are used in lists.
14th Apr 2017, 3:12 PM
Akshay
0
@Akshay not really... for the same syntaxic use, they produce different types
15th Apr 2017, 9:10 AM
Amaras A
Amaras A - avatar