473,378 Members | 1,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Help with List

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
1 1026
bartonc
6,596 Expert 4TB
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

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

Similar topics

6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
5
by: jhon02148 | last post by:
hi this hw have four files: 1. for the main program 2. listp.cpp (the source file) 3. listp.h (the header file) 4. exception.h if there is anybody who could help me with this hw i really...
7
by: Christian Christmann | last post by:
Hi, in the past I always appreciated your help and hope that you also can help me this time. I've spent many many hours but still can't solve the problem by myself and you are my last hope. ...
5
by: Steve Patrick | last post by:
Hi All You guys are my last hope, despite spending money on books and hours reading them I still can not achieve the results I need. I have designed a database in Access 2000 based on 1 table,...
2
by: Foodbank | last post by:
Hi everyone, I'm having trouble implementing a supposedly simple Least Significant Digit first Radix Sort. The book I'm using gave me somewhat of a template that I touched up (below), but I'm...
2
by: duncanblacksmithmath | last post by:
I know a lot of you have seen this before but I have worked on the program and have gotten it to work thus far but I need help getting these two functions to work and implementing them. Here is...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
83
by: deppy_3 | last post by:
Hi.I am started learning Programm language C before some time.I am trying to make a programm about a very simple "sell shop".This programm hasn't got any compile problem but when i run it i face...
6
by: sandy | last post by:
I am creating a class (or so I hope) which is to be a JobCollection, linked list of 'Job'. Job is another class already created. JobCollection is just the linked list manager. I have to have...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.