PDA

View Full Version : declaring undefined variables


CaptainLinux94
April 15th, 2008, 09:30 AM
Hello everyone,

I just started experimenting with some Python examples that I found online... I am curious to know how to declare an undefined variable (if it matters I'm looking to declare an undefined variable in the code).

Thanks,
CP94

nick_h
April 15th, 2008, 09:45 AM
In python you don't declare variables before you use them. Just initialise the variable to the type you require.

CaptainLinux94
April 15th, 2008, 09:51 AM
In python you don't declare variables before you use them. Just initialise the variable to the type you require.

Alright, that's what I thought, thank you.