diff --git a/pgmpy/models/MarkovChain.py b/pgmpy/models/MarkovChain.py
index <HASH>..<HASH> 100644
--- a/pgmpy/models/MarkovChain.py
+++ b/pgmpy/models/MarkovChain.py
@@ -388,7 +388,7 @@ class MarkovChain(object):
         """
         variable_copy = []
         cardinalities_copy = []
-        for var,card in self.cardinalities.iteritems():
+        for var,card in self.cardinalities.items():
             variable_copy.append(var)
             cardinalities_copy.append(card)
Replcaed iteritems with items for Python 3 compatibility.