Hi, I'm new to python, but I want to start learning :)
I just wondered if anyone could tell me how to use a variable from a function outside the function?
bobbysox
0
Newbie Poster
Recommended Answers
Jump to Postdef hello(textt): global text # this makes it global so that its not only accessible in the funktion text = textt hello("hello") print text
=) enjoy
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.