if I'm not mistaken global does not define a variable. On a 2nd note you probably do not need to declare it a global variable unless there is a reason.
Examples:
Examples:
#! /usr/bin/env python3 myvar = 'some text' print(f'Outside -> {myvar}') def myfunc(): print(f'Inside function - > {myvar}') myfunc() class MyClass: def __init__(self): print(f'Inside class - > {myvar}') MyClass()
Output:Outside -> some text
Inside function - > some text
Inside class - > some text
define it to be a blank variable outside the ifde = ''
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags