[Tutor] Noob to Python - Need help with Variables

lonetwin lonetwin@yahoo.com
Thu Jun 5 09:55:03 2003


Hey Tony,
    I'm forwarding this to the list ....(when you reply to a post on the tutor 
list it is sent back to the author of the mail, not to the list. It's just 
something you have to get used to ;-) )

On Thursday 05 June 2003 06:13 pm, you wrote:
> Hi Steve,
>
>
> Thanks for that.. That makes much more sense now.
> Coudl I please ask you one more question then... Seeing as how well you
> answered the last one ;-)
>
> Now that i have 'declared' this variable?
> How do I use that ?
>
> For e.g.
>
> shutil.rmtree("d:\\tempint\"user"
>
> "user" is where i want the results of the variable to be inserted.
> I understand now that using quotes will only force python to use it as a
> string, but I want or shoudl I say need the username to be placed in here.

Here's a question, how do you include a variable in a string that you want to 
print ??
ie: If I have :
>>> my_name = "Steve"
>>> Greeting = "hi there !!"

how do I get python to print "This is Steve saying, hi there !!" ??
     If you know how to do that you should apply the same logic to your 
problem. If you don't, I suggest you go through some introductory documents 
and play around in the interpreter(*). I'm tempted to give you the answer, 
but I believe you really should learn basic programming before you start 
using modules like 'shutil'.

...and don't worry, you can always ask questions here if you get stuck at 
someplace ...but you really should get the basic stuff under your belt before 
you move on.

(*) Introductory docs can be found at:
http://www.python.org/doc/Intros.html
    Look under "Introductions to Python programming for non-programmers"

Peace
Steve


-- 
Never be afraid to tell the world who you are.
                                     - Anonymous