Updated syntax for Python code