Initializing variables


#1

is there any way to initialize variables in this like in java?

Sometimes in my code I don't know what I should assign to my variable without breaking my code, so I would like to just say it exists and that I can use it.

would doing something like asdf=asdf work for this?


#2

I don't think there is any variables initialization in python. You can just assign an integer value to one variable, and assign a string to the exact same variable later.

But I suppose asdf=asdf won't work. It will work with asdf='asdf'


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.