5 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Niloofar24

Hello. mylist = [6, '/', 3, '+', 9, '+', 8, '+', 1, '/', 2] How can i delete that list indexes? I tried: def clear(self, event): global numbers for i in numbers: print i del numbers[i] But it didn't work: File "./kivycal", line 83, in clear del numbers[i] TypeError: list …

Member Avatar for Niloofar24
0
274
Member Avatar for Tycellent

Hey guys, Was wondering if someone could assist me in elaborating the c_str() function... I understand that it returns a pointer to an array that contains a null-terminated sequence of character but could someone further elaborate upon this, perhaps with a simple example. Cheers,

Member Avatar for Lerner
0
178
Member Avatar for nouth

my [previous question](http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/477450/convert-str-to-var) about this dealt with global vars but unfortunatley the `window` of opportunitys doesn't work with this next example because it alerts 4 times instead of only 1 test("a","b","c"); function test(var0,var1,var2,var3) { for(var i=0; i<4; i++) { if(window["var"+i]===undefined) {alert("test");} } } this may not be very clear so …

Member Avatar for felgall
0
345
Member Avatar for nouth

this is my attempt var test=["a","b","c"]; var var0="a"; for(var i=0; i<1; i++) { test.splice(test.indexOf(test[window["var"+i.toString()]]),1); } alert(test); it alerts "a,b" but I want it to alert "b,c" ref:http://stackoverflow.com/questions/5613834/convert-string-to-variable-name-in-javascript

Member Avatar for nouth
0
421
Member Avatar for RHNation

def main(): print ('Welcome to the mpg calculator program') print() #get the miles driven using the input function miles_driven = input ("Please enter miles driven: ") miles_driven = float (miles_driven) #get the gallons used using the input function gallons_used = input ("Please enter gallons used: ") galons_used = float (gallons_used) …

Member Avatar for farmwife
0
297

The End.