import time myd={1:'a',2:'b'} while True: for key,value in dict.items(myd): print(key,value) time.sleep(1)