Newbie: How to convert a tuple of strings into a tuple of ints

2015-12-30 Thread otaksoftspamtrap
How do I get from here t = ('1024', '1280') to t = (1024, 1280) Thanks for all help! -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie: How to convert a tuple of strings into a tuple of ints

2015-12-30 Thread Chris Angelico
On Thu, Dec 31, 2015 at 9:46 AM, wrote: > How do I get from here > > t = ('1024', '1280') > > to > > t = (1024, 1280) > > > Thanks for all help! t = (int(t[0]), int(t[1])) If the situation is more general than that, post your actual code and we can help out more.

Re: Newbie: How to convert a tuple of strings into a tuple of ints

2015-12-30 Thread Ben Finney
otaksoftspamt...@gmail.com writes: > How do I get from here > > t = ('1024', '1280') > > to > > t = (1024, 1280) Both of those are assignment statements, so I'm not sure what you mean by “get from … to”. To translate one assignment statement to a different assignment statement, re-write the

Re: Newbie: How to convert a tuple of strings into a tuple of ints

2015-12-30 Thread Ian Kelly
On Wed, Dec 30, 2015 at 3:46 PM, wrote: > How do I get from here > > t = ('1024', '1280') > > to > > t = (1024, 1280) Deja vu: https://mail.python.org/pipermail/python-list/2015-December/701017.html -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie: How to convert a tuple of strings into a tuple of ints

2015-12-30 Thread otaksoftspamtrap
Thanks much - both solutions work well for me On Wednesday, December 30, 2015 at 2:57:50 PM UTC-8, Ben Finney wrote: > kierkega...@gmail.com writes: > > > How do I get from here > > > > t = ('1024', '1280') > > > > to > > > > t = (1024, 1280) > > Both of those are assignment statements, so