Add Javascript Variable Rules In Python Iteration