Hi everyone,
I am creating a game where the user inputs a coordinate to place their piece on
a chess board. My code then draws the chess board with a turtle and fills in
the squares in with green where the user can place their next piece. After the
user inputs their first coordinate, the turtle
Rory Schramm writes:
> I'm trying to use python list comprehensions to combine multiple terms
> for use by a for loop if condition.
Thank you for a small code example. It doesn't have enough to illustrate
the problem you're describing; we can't run it and see what you're seeing.
> filters = [ '
Matěj Cepl wrote:
On 2017-04-21, 21:54 GMT, Peter Otten wrote:
It's not the algorithm, it's the width. Try
textwrap.fill(text, 72).
I don’t understand. Why 72?
Because the first line including those words is 72 characters
long.
I don't know what vim is doing, but if you tell Python you
wan
On 2017-04-22 01:17, Rory Schramm wrote:
Hi,
I'm trying to use python list comprehensions to combine multiple terms for
use by a for loop if condition.
filters = [ 'one', 'two', 'three']
for line in other_list:
if ' and '.join([item for item in filters]) not in line[2]:
print lin
Hi there,
For what, you want to learn?
On Sat, Apr 22, 2017 at 1:10 AM, Thomas Nyberg wrote:
> On 04/21/2017 08:06 AM, harounelyaako...@gmail.com wrote:
> > Hey everyone, I'm willing to learn python , ant advices ?
> > Thanks in advance
> >
> Here is a tutorial:
>
> https://docs.python.org/
On 2017-04-21 23:17, Matěj Cepl wrote:
On 2017-04-21, 21:54 GMT, Peter Otten wrote:
It's not the algorithm, it's the width. Try
textwrap.fill(text, 72).
I don’t understand. Why 72? I have set tw=65 in vim.
textwrap.fill counts characters. It won't put "grown so" on the first
line because tha
Hi,
I'm trying to use python list comprehensions to combine multiple terms for
use by a for loop if condition.
filters = [ 'one', 'two', 'three']
for line in other_list:
if ' and '.join([item for item in filters]) not in line[2]:
print line
The list comp returns one and two and thr
On 2017-04-21, 21:54 GMT, Peter Otten wrote:
> It's not the algorithm, it's the width. Try
> textwrap.fill(text, 72).
I don’t understand. Why 72? I have set tw=65 in vim.
Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: mc...@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B
Matěj Cepl wrote:
> I have a gedit Python plugin which should do line wrap using
> textwrap.fill() function. However, even when I have set the
> length of line to the same number as in vim (65), the result is
> substantially different (textwrap.fill paragraphs are
> significantly narrower). See f
Hi,
I have a gedit Python plugin which should do line wrap using
textwrap.fill() function. However, even when I have set the
length of line to the same number as in vim (65), the result is
substantially different (textwrap.fill paragraphs are
significantly narrower). See for example this diff
On 2017-04-21 12:58, Mohammed Ahmed wrote:
> Write a function sorting(L) that takes a list of numbers and
> returns the list with all elements sorted in ascending order.
> Note: do not use the sort built in function
>
> it is a python question
No "sort" functions here...
>>> lst=[3,1,4,1,5,9,2
On 21/04/2017 21:04, Mohammed Ahmed wrote:
On Friday, April 21, 2017 at 10:02:55 PM UTC+2, Chris Angelico wrote:
On Sat, Apr 22, 2017 at 5:58 AM, Mohammed Ahmed wrote:
Write a function sorting(L) that takes a list of numbers and returns the list
with all
elements sorted in ascending order.
No
On 04/21/2017 01:01 PM, Mohammed Ahmed wrote:
Write a function group(L) that takes a list of integers. The function returns a
list of
two lists one containing the even values and another containing the odd values.
it is a python question
In fact, this is *not* a question, Python or otherwise.
On Fri, Apr 21, 2017 at 2:01 PM, Mohammed Ahmed wrote:
> Write a function group(L) that takes a list of integers. The function returns
> a list of
> two lists one containing the even values and another containing the odd
> values.
>
> it is a python question
This group will be happy to help you
On 04/21/2017 01:58 PM, Mohammed Ahmed wrote:
> Write a function sorting(L) that takes a list of numbers and returns the list
> with all
> elements sorted in ascending order.
> Note: do not use the sort built in function
>
> it is a python question
Sounds like a basic homework question.
Which p
On 04/21/2017 01:04 PM, Mohammed Ahmed wrote:
On Friday, April 21, 2017 at 10:02:55 PM UTC+2, Chris Angelico wrote:
On Sat, Apr 22, 2017 at 5:58 AM, Mohammed Ahmed wrote:
Write a function sorting(L) that takes a list of numbers and returns the list
with all
elements sorted in ascending order.
On Sat, Apr 22, 2017 at 6:04 AM, Mohammed Ahmed wrote:
> On Friday, April 21, 2017 at 10:02:55 PM UTC+2, Chris Angelico wrote:
>> On Sat, Apr 22, 2017 at 5:58 AM, Mohammed Ahmed
>> wrote:
>> > Write a function sorting(L) that takes a list of numbers and returns the
>> > list with all
>> > eleme
On Friday, April 21, 2017 at 10:02:55 PM UTC+2, Chris Angelico wrote:
> On Sat, Apr 22, 2017 at 5:58 AM, Mohammed Ahmed wrote:
> > Write a function sorting(L) that takes a list of numbers and returns the
> > list with all
> > elements sorted in ascending order.
> > Note: do not use the sort built
On Friday, April 21, 2017 at 10:01:40 PM UTC+2, alister wrote:
> On Fri, 21 Apr 2017 12:58:52 -0700, Mohammed Ahmed wrote:
>
> > Write a function sorting(L) that takes a list of numbers and returns the
> > list with all elements sorted in ascending order.
> > Note: do not use the sort built in fun
Write a function group(L) that takes a list of integers. The function returns a
list of
two lists one containing the even values and another containing the odd values.
it is a python question
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 21 Apr 2017 12:58:52 -0700, Mohammed Ahmed wrote:
> Write a function sorting(L) that takes a list of numbers and returns the
> list with all elements sorted in ascending order.
> Note: do not use the sort built in function
>
> it is a python question
& the reason for this question is wha
On Sat, Apr 22, 2017 at 5:58 AM, Mohammed Ahmed wrote:
> Write a function sorting(L) that takes a list of numbers and returns the list
> with all
> elements sorted in ascending order.
> Note: do not use the sort built in function
>
> it is a python question
Yes, it is. It looks like the sort of
Write a function sorting(L) that takes a list of numbers and returns the list
with all
elements sorted in ascending order.
Note: do not use the sort built in function
it is a python question
--
https://mail.python.org/mailman/listinfo/python-list
On Saturday, December 5, 2009 at 11:52:52 PM UTC-5, hussain dandan wrote:
> Movie Download Reviews offers Free Online Movie Download,Hollywood
> Movie Download,Free Full Movie Download,Download Latest Hollywood
> Movies,Free Movie
>
> http://hollywood-moives.blogspot.com/
> http://hollywood-moives
On 04/21/2017 08:06 AM, harounelyaako...@gmail.com wrote:
> Hey everyone, I'm willing to learn python , ant advices ?
> Thanks in advance
>
Here is a tutorial:
https://docs.python.org/3/tutorial/
--
https://mail.python.org/mailman/listinfo/python-list
On 04/21/2017 06:33 AM, Ethan Furman wrote:
On 04/21/2017 03:38 AM, breamore...@gmail.com wrote:
Talking of signatures another of Robert L's beauties landed three or so hours
ago. He really is a right little
charmer :-(
Not on the Python Mailing List.
I see one of them made it through.
On Friday, April 21, 2017 at 2:33:03 PM UTC+1, Ethan Furman wrote:
> On 04/21/2017 03:38 AM, breamoreboy wrote:
>
> > Talking of signatures another of Robert L's beauties landed three or so
> > hours ago. He really is a right little charmer :-(
>
> Not on the Python Mailing List.
>
> --
> ~Eth
Hey everyone, I'm willing to learn python , ant advices ?
Thanks in advance
--
https://mail.python.org/mailman/listinfo/python-list
On 04/21/2017 03:38 AM, breamore...@gmail.com wrote:
Talking of signatures another of Robert L's beauties landed three or so hours
ago. He really is a right little charmer :-(
Not on the Python Mailing List.
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, April 21, 2017 at 10:08:08 AM UTC+1, Antoon Pardon wrote:
> Op 20-04-17 om 17:25 schreef Rustom Mody:
> > But more importantly thank you for your polite and consistent pointing out
> > to
> > Ben Finney that his religion-bashing signature lines [many of them] and his
> > claims to wish
Skip Montanaro wrote:
> On Thu, Apr 20, 2017 at 3:19 PM, Peter Otten <__pete...@web.de> wrote:
>
>> If being helpful really is the only purpose of the metaclass you can
>> implement a SomeClass.__dir__() method instead:
>>
>> def __dir__(self):
>> names = dir(self._instance)
>>
2017-04-20 15:55 GMT-05:00 Lele Gaifax :
> Does
>
> underlying = getattr(SomeOtherClass, a)
> def _meth(self, *args, _underlying=underlying):
> return _underlying(self._instance, *args)
>
> help?
>
Hi, Lele. Long time no chat...
I thought of that, but with _underlying declared af
On Thu, Apr 20, 2017 at 3:19 PM, Peter Otten <__pete...@web.de> wrote:
> If being helpful really is the only purpose of the metaclass you can
> implement a SomeClass.__dir__() method instead:
>
> def __dir__(self):
> names = dir(self._instance)
> #
> return names
>
Tim Chase writes:
> On 2017-04-21 08:23, Jussi Piitulainen wrote:
>> Tim Chase writes:
>>> Bash:
>>> cat <>> "single and double" with \ and /
>>> EOT
>>>
>>> PS: yes, bash's does interpolate strings, so you still need to do
>>> escaping within, but the arbitrary-user-specified-delimiter ide
On 2017-04-21 08:23, Jussi Piitulainen wrote:
> Tim Chase writes:
>> Bash:
>> cat <> "single and double" with \ and /
>> EOT
>>
>> PS: yes, bash's does interpolate strings, so you still need to do
>> escaping within, but the arbitrary-user-specified-delimiter idea
>> still holds.
>
> If you
Op 20-04-17 om 17:25 schreef Rustom Mody:
> But more importantly thank you for your polite and consistent pointing out to
> Ben Finney that his religion-bashing signature lines [many of them] and his
> claims to wish this list be welcoming are way out of sync.
I don't know. I think a concept like
> > I have a string which is returned by a C extension.
> >
> > mystring = '(1,2,3)'
> >
> > HOW can I read the numbers in python ?
>
> re.findall seems the safest and easiest solution:
>
> >>> re.findall(r'(\d+)', '(1, 2, 3)')
> ['1', '2', '3']
> >>> map(int, re.findall(r'(\d+)', '(1, 2, 3)'))
>
37 matches
Mail list logo