Re: Newbie: String to Tuple

2015-12-22 Thread KP
On Tuesday, 22 December 2015 12:59:59 UTC-8, Mark Lawrence wrote: > On 22/12/2015 20:53, KP wrote: > > How do I convert > > > > '1280,1024' > > > > to > > > > (1280,1024) ? > > > > Thanks for all help! > > > > Start with this https://docs.python.org/3/library/stdtypes.html#str.split > > -- > My

Re: Newbie: String to Tuple

2015-12-22 Thread Peter Otten
KP wrote: > How do I convert > > '1280,1024' > > to > > (1280,1024) ? >>> import ast >>> ast.literal_eval('1280,1024') (1280, 1024) -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie: String to Tuple

2015-12-22 Thread Mark Lawrence
On 22/12/2015 20:53, KP wrote: How do I convert '1280,1024' to (1280,1024) ? Thanks for all help! Start with this https://docs.python.org/3/library/stdtypes.html#str.split -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawre

Newbie: String to Tuple

2015-12-22 Thread KP
How do I convert '1280,1024' to (1280,1024) ? Thanks for all help! -- https://mail.python.org/mailman/listinfo/python-list