As a developer, I was working on a large data processing project for a client in California. I faced a situation where I needed to declare variables first and only assign values later in the program.
If you have been coding in Python for a while, you know that, unlike some other programming languages (like Java or C++), Python does not allow you to declare a variable without assigning it a value.
But here’s the good news: there are a few practical workarounds that I use in my projects. In this tutorial, I’ll share with you the different ways I declare a variable without assigning it an actual value right away.
Method 1: Use None in Python
In Python, to declare a variable without assigning it a value, set it to None. The None keyword in Python is used to define variables that store a null or not accessible value.
USA_coordinates = None
print(USA_coordinates)Output:
NoneYou can see the output in the screenshot below.

This method initializes a variable with None, representing the absence of a value in Python.
Method 2: Use an Empty Python List
If you need to declare a variable of list type, declare an empty list. An empty list in Python does not store any elements. However, it still enables you to call list-specific methods.
Texas_population = []
print(Texas_population)
print(type(Texas_population))Output:
[]
<class 'list'>You can see the output in the screenshot below.

This method declares a variable as an empty list, allowing list operations without storing any elements.
Method 3: Use an Empty Dictionary in Python
In Python, a dictionary is a mapping of key-value pairs. If you need to declare an empty dictionary, use an empty set of curly braces {}.
cities = {}
print(cities)
print(type(cities))Output:
{}
<class 'dict'>You can see the output in the screenshot below.

This method declares a variable as an empty dictionary, ready to store key-value pairs.
Method 4: Use an Empty Set in Python
This is another way to declare a variable without assigning it a value with an empty set. In Python, a set object is an unordered collection of unique elements.
car_brands = set()
print(car_brands)
print(type(car_brands))Output:
set()
<class 'set'>You can see the output in the screenshot below.

This method initializes a variable as an empty set, ready to store unique elements.
Method 5: Use an empty tuple() Class in Python
In Python, a tuple is an ordered, immutable collection of elements. I will use the tuple() class to achieve the result in this approach.
my_variable = tuple()
print(my_variable)
print(type(my_variable))Output:
()
<class 'tuple'>You can see the output in the screenshot below.

This method creates an empty tuple, an immutable ordered collection ready to store elements.
I hope you like this article. Here, I have covered how to declare a variable without assigning it a value in Python with different approaches and descriptive examples.
I have explained various ways to declare a variable without assigning it a value in Python, such as using None, with an empty list, empty dictionary, empty set() class, and empty tuple() class.
Every approach has advantages and use cases; choose according to your requirements.
You may also like to read:
- Sort a List of Tuples in Python
- Get the Last Element of a List in Python
- Split a List in Python
- Print Lists in Python

Bijay Kumar is an experienced Python and AI professional who enjoys helping developers learn modern technologies through practical tutorials and examples. His expertise includes Python development, Machine Learning, Artificial Intelligence, automation, and data analysis using libraries like Pandas, NumPy, TensorFlow, Matplotlib, SciPy, and Scikit-Learn. At PythonGuides.com, he shares in-depth guides designed for both beginners and experienced developers. More about us.