Mar-10-2022, 12:39 PM
(Mar-10-2022, 12:29 PM)menator01 Wrote:data = {'Manufacturer': 'VMware, Inc.', 'Model': 'VMware7,1', 'Name': 'DC01', 'Index': '1', 'IPAddress': ['192.168.1.240,fe80::350e:d28d:14a5:5cbb'], 'UserName': None} print(f"Manufacturer: {data['Manufacturer']}")
Output:Manufacturer: VMware, Inc.
I dont understand why it doesnt work on my pc.
I gave an error.
Traceback (most recent call last): File "C:\Users\DELL\AppData\Roaming\JetBrains\PyCharmCE2021.3\scratches\scratch_38.py", line 4, in <module> print(f"Manufacturer: {data['Manufacturer']}") TypeError: list indices must be integers or slices, not str