Re: Help with this code

2017-01-10 Thread jladasky
On Monday, January 9, 2017 at 12:50:11 PM UTC-8, Joaquin Alzola wrote: > >> elements. For example, if we have a list_a=["a","b","c","d"] and > >> list_b=["a","b"] I want to obtain a new list_c containing elements that > >> match between these lists (a and b here), > > >Perhaps this might work: >

RE: Help with this code

2017-01-09 Thread Joaquin Alzola
>> elements. For example, if we have a list_a=["a","b","c","d"] and >> list_b=["a","b"] I want to obtain a new list_c containing elements that >> match between these lists (a and b here), >Perhaps this might work: list(set(list_a).intersection(set(list_b))) >['a', 'b'] >>> list_a={"a","b","

Re: Help with this code

2017-01-09 Thread Joel Goldstick
On Mon, Jan 9, 2017 at 1:02 PM, Gilmeh Serda wrote: > On Mon, 09 Jan 2017 05:08:51 -0800, José Manuel Suárez Sierra wrote: > >> elements. For example, if we have a list_a=["a","b","c","d"] and >> list_b=["a","b"] I want to obtain a new list_c containing elements that >> match between these lists (

Re: Help with this code

2017-01-09 Thread Peter Otten
José Manuel Suárez Sierra wrote: > This is the traceback: > line 18, in > for transf2[j] in transf2: > IndexError: list assignment index out of range > > If I have initialized j=0 (such as i) why does it not work? A for loop for x in y: ... sequentually assigns every value in y to x. So wi

Re: Help with this code

2017-01-09 Thread José Manuel Suárez Sierra
El lunes, 9 de enero de 2017, 14:09:09 (UTC+1), José Manuel Suárez Sierra escribió: > Hello, I am trying to make a code wich compares between 2 or several > sequences (lists). It compares every element in a list with another list > elements. For example, if we have a list_a=["a","b","c","d"] an

Re: Help with this code

2017-01-09 Thread José Manuel Suárez Sierra
El lunes, 9 de enero de 2017, 14:09:09 (UTC+1), José Manuel Suárez Sierra escribió: > Hello, I am trying to make a code wich compares between 2 or several > sequences (lists). It compares every element in a list with another list > elements. For example, if we have a list_a=["a","b","c","d"] an

Re: Help with this code

2017-01-09 Thread Peter Otten
José Manuel Suárez Sierra wrote: > Hello, Welcome! > I am trying to make a code wich compares between 2 or several > sequences (lists). It compares every element in a list with another list > elements. For example, if we have a list_a=["a","b","c","d"] and > list_b=["a","b"] I want to obtain a

RE: Help with this code

2017-01-09 Thread Deborah Swanson
José Manuel Suárez Sierra wrote, on January 09, 2017 5:09 AM > > Hello, I am trying to make a code wich compares between 2 or > several sequences (lists). It compares every element in a > list with another list elements. For example, if we have a > list_a=["a","b","c","d"] and list_b=["a","b"]

Help with this code

2017-01-09 Thread José Manuel Suárez Sierra
Hello, I am trying to make a code wich compares between 2 or several sequences (lists). It compares every element in a list with another list elements. For example, if we have a list_a=["a","b","c","d"] and list_b=["a","b"] I want to obtain a new list_c containing elements that match between the

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread Mark H Harris
On 5/28/14 12:32 PM, funky wrote: import pygame <== a very good place to start import random import time import sys http://www.pygame.org/wiki/tutorials My hourly rate is $295.00 /hour, w/2hour minimum, happy to send you a contract of engagement and a copy of my document of unde

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread Ian Kelly
On Wed, May 28, 2014 at 11:32 AM, funky wrote: > while done == False: > for event in pygame.event.get(): > if event.type == pygame.QUIT: > done == True Here is one fairly obvious bug; you used "==" where you presumably intended to do an assignment. As it stands it will ju

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread Grant Edwards
On 2014-05-28, funky wrote: [program that apparently doesn't work] I'll fix it for you. My rates are $150/hour with a 4-hour minimum paid up-front. -- Grant Edwards grant.b.edwardsYow! PUNK ROCK!! DISCO at DUCK!! BIRTH CO

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread John Gordon
In <8bc01036-ee9e-4de9-b569-7039dcc05...@googlegroups.com> funky writes: What do you want the program to do? What is it doing instead? Do you get any error messages? Don't just throw code at us and ask us to fix it... -- John Gordon Imagine what it must be like for a real medical doct

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread Gary Herron
On 05/28/2014 10:32 AM, funky wrote: <100+ lines of code removed.> No way. This is not a paid service, but rather a community of Python users. You can get lots of help here, but you have to put in some work. Please take the time to tell us: What this code should do. What it actually d

need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread funky
import pygame import random import time import sys black = (0, 0, 0) white = (255, 255, 255) red = (255, 0, 0) class Block(pygame.sprite.Sprite): def __init__(self, color, width, height): pygame.sprite.Sprite.__init__(self) self.image = pygame.Surface([width, height]) s