Skip to content
Discussion options

You must be logged in to vote

You can just define X: int in the global scope without an assignment:

X: int

def read_data():
    global X
    X = db_read()

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dineshbvadhia
Comment options

@JelleZijlstra
Comment options

Answer selected by dineshbvadhia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants