Just use OOP:
class SomeClass:
def __init__(self):
self.hi = "Hello"
self.name = "Jake"
self.isTrue = True
def callingValues(self):
print(self.hi, self.name, self.isTrue)
sc = SomeClass()
sc.callingValues()
More Related Contents:
- What is the naming convention in Python for variable and function?
- Correct Use Of Global Variables In Python 3
- Trying to use a returned value without the other parts of a function [closed]
- Python for in range()
- Check if input is empty
- How to use a variable inside a regular expression?
- What is the naming convention in Python for variable and function names?
- How to get the original variable name of variable passed to a function
- Calling variable defined inside one function from another function
- How to use a return statement in a for loop?
- Function changes list values and not variable values in Python [duplicate]
- What are good uses for Python3’s “Function Annotations”?
- How can I use `return` to get back multiple values from a for loop? Can I put them in a list?
- How to call function that takes an argument in a Django template?
- Builtin function not working with Spyder
- Setting variables with exec inside a function
- Function chaining in Python
- How to make function decorators and chain them together in Python?
- Is it possible to not return anything from a function in python?
- How to Open a file through python
- How to check if a variable is a function in Python?
- Python decorator? – can someone please explain this? [duplicate]
- Python: function and variable with the same name
- Python Turtle.Terminator even after using exitonclick()
- How to apply a function to each sublist of a list in python?
- Python how to get the calling function (not just its name)?
- Which is the preferred way to concatenate a string in Python?
- No module named ‘pandas._libs.tslibs.timedeltas’ in PyInstaller
- python 3 open() default encoding
- How can I simulate 2.x’s tuple unpacking for lambda parameters, using 3.x?