By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,427 Members | 1,356 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,427 IT Pros & Developers. It's quick & easy.

Help with List

P: 1
Hi.I'm very interesting in Python programing, i'm starting with a program with but I have one question. I do a list with append that changes the hue each time and the saturation and brightness is the same.

todos=[]
todos.append('color('+str(hue) + ',' + str(saturacion)+ ',' + str(brillo)+')')
print todos

['color(0.27777778,100,100)', 'color(0.55555556,100,100)', 'color(0.83333334,100,100)', 'color(1.11111112,100,100)', 'color(1.3888889,100,100)', 'color(1.66666668,100,100)', 'color(1.94444446,100,100)'...etc

The problem arrive because i need to do for example:

fill(todos[0])

and it's imposible because the list appears with , i need transform or make different the list without and i don't now how, i need something like that.

[color(0.27777778,100,100), color(0.55555556,100,100), color(0.83333334,100,100), color(1.11111112,100,100), color(1.3888889,100,100), color(1.66666668,100,100), color(1.94444446,100,100)...etc

thank for your time and excuse me for my poor english.
Jul 28 '07 #1
Share this Question
Share on Google+
1 Reply


bartonc
Expert 5K+
P: 6,596
Hi.I'm very interesting in Python programing, i'm starting with a program with but I have one question. I do a list with append that changes the hue each time and the saturation and brightness is the same.

todos=[]
todos.append('color('+str(hue) + ',' + str(saturacion)+ ',' + str(brillo)+')')
print todos

['color(0.27777778,100,100)', 'color(0.55555556,100,100)', 'color(0.83333334,100,100)', 'color(1.11111112,100,100)', 'color(1.3888889,100,100)', 'color(1.66666668,100,100)', 'color(1.94444446,100,100)'...etc

The problem arrive because i need to do for example:

fill(todos[0])

and it's imposible because the list appears with , i need transform or make different the list without and i don't now how, i need something like that.

[color(0.27777778,100,100), color(0.55555556,100,100), color(0.83333334,100,100), color(1.11111112,100,100), color(1.3888889,100,100), color(1.66666668,100,100), color(1.94444446,100,100)...etc

thank for your time and excuse me for my poor english.
I think that you are looking for
Expand|Select|Wrap|Line Numbers
  1. fill(eval(todos[0]))
Jul 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.