Easy way to get a list of tuples.
Sayth Renshaw
flebber.crue at gmail.com
Thu Sep 21 21:37:47 EDT 2017
> >
> > Thanks Thomas yes you are right with append. I have tried it but just
> > can't get it yet as append takes only 1 argument and I wish to give it 3.
> >
> You have not showed us what you tried, but you are probably missing a pair
> of brackets.
>
> C:\Users\User>python
> Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit
> (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> x = []
> >>> x.append(('a', 'b', 'c'))
> >>> x.append(('p', 'q', 'r'))
> >>> x
> [('a', 'b', 'c'), ('p', 'q', 'r')]
> >>>
>
> Does this help?
>
> Frank Millman
Oh yes I just had one set of brackets with my append.
Thanks
Frank
More information about the Python-list
mailing list