1
vote
1answer
52 views

Python: loop to split list in different sublists

I want to split one list of number comparing the first number of the sequence with the next one to figure out if it's bigger, in this case we create that sublist till find one number who is smaller. ...
0
votes
3answers
35 views

Python Single Line Nested For Loops

Wrote this function in python that transposes a matrix: def transpose(m): height = len(m) width = len(m[0]) return [ [ m[i][j] for i in range(0, height) ] for j in range(0, width) ] In ...
0
votes
2answers
43 views

Repeat Loop upon False

The function below calls for the input command and check if str.isalnum(). def enterPass(str): x = raw_input("enter password Alpha or Alphanumeric! 'No_Space' :") if x.isalnum(): ...
0
votes
1answer
11 views

Use of SET to ignore pre logged users in a looping script

I am trying to use a set in order to stop users being re printed in the following code. I managed to get python to accept he code without producing any bugs, but if I let the code run on a 10 second ...
0
votes
5answers
46 views

Looping a specific amount of times, each time making a new list

Basically what I want to do is have a program that makes a list based on user input, such as: a=input b=input c=input list1=[a,b,c] then have it do it again (forming list2) and again and so on, ...
3
votes
1answer
60 views

Python car race winner [closed]

I need to create a Python program that will determine the winner of a race using the equation odometer_miles = odometer_miles + speed * time and with a class called Car that has "total odometer ...
-1
votes
1answer
48 views

How to use matplotlib in my Python Program [closed]

Have a program written in Python. Matplotlib need to draw graphics using the program. "dalgafonksiyonu" and "x" by using the values ​​have to create the chart. Single "for" and "while" loops, I do not ...
0
votes
4answers
127 views

python print one line same space

I need to print 'ok' in same place. Any ways to do it? I've found solutions but they don't works with IDLE correctly: while (count < 9): if statusm == "<Status>OK</Status>": ...
1
vote
4answers
41 views

python last element change to different format

i have a list such as this 1,2,3,4,5,6,7,8,9,10. I want to loop through it with python code, and properly format it to 1,2,3,4,5,6,7,8,9,10. The following is the code that i am using to execute the ...
-1
votes
1answer
34 views

Loop taking longer inexplicably [closed]

I know thats a vague title - perhaps because the question is vague! I have a python procedure that loops through every item (an object i defined) in a set performing a function on each of the ...
0
votes
1answer
24 views

If Statements in pygame

Im writing a pygame Where you basically have to dodge stars. it has a store and you can buy a force field but i only want the force field to work 3 times then go away when you buy the force field ...
0
votes
0answers
16 views

PyQT4 - program dosn't respond

I'm writing program with GUI and I've got sometimes a problem. In program I've got one method which is a long loop. When this method works, my program (sometimes) dosn't respond, but after method ...
-1
votes
3answers
67 views

Python: How to traverse a List[Dict{List[Dict{}]}]

I was just wondering if there is a simple way to do this. I have a particular structure that is parsed from a file and the output is a list of a dict of a list of a dict. Currently, I just have a ...
-3
votes
2answers
63 views

Returning a string for the number with prefix 0s

I don't understand this question and confused. can anyone show me? It's an exercise in a python book. Only can use loop and function. And based on the question, have to ask the user to enter the ...
0
votes
1answer
47 views

Mapping user id onto a dict comparing to see if user is already in dict

I have code which currently prints out data for each user from an XML file (obtained from a website) the XML updates as more users interact with it throughout the day. I currently have my code looping ...

1 2 3 4 5 75
15 30 50 per page